Skip to content

panel: P6.1 mobile companion foundations — bottom TabBar nav, Tier-3 gates, phone shell - #106

Merged
thevladbog merged 17 commits into
mainfrom
feature/panel-p6.1-mobile-foundations
Jul 23, 2026
Merged

panel: P6.1 mobile companion foundations — bottom TabBar nav, Tier-3 gates, phone shell#106
thevladbog merged 17 commits into
mainfrom
feature/panel-p6.1-mobile-foundations

Conversation

@thevladbog

@thevladbog thevladbog commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

First phase of the P6 mobile companion (spec, plan, design boards `Idento Panel Mobile.dc.html` 8a–8t): every panel route is now honest at phone width — adapted or gated, zero horizontal scrolling at 390px. Same SPA, same URLs, render-time adaptation only; zero backend/OpenAPI changes.

  • `@idento/ui`: new `TabBar`/`TabBarItem` (board 8r: 44px targets, safe-area padding, warning attention dot) and `DesktopOnlyGate` (board 8o: canvas-tool / agent-bound / bulk-data flavors, copy-link with 2s copied state + polite live region); `bottom` side for `Sheet`.
  • Adaptive conventions codified in `panel/AGENTS.md` + the one sanctioned `useIsMobile()` hook (matchMedia, `md` cutover).
  • Tier-3 gates via `DesktopOnly` wrapper on badge / zones / settings / attendees (temporary until the P6.3 search list) / equipment / checkin / launch — render swap on the same URL, never a redirect; gated pages' queries/effects never run on phones.
  • Phone workspace nav (board 8a): `EventTabBar` (Overview / Monitor / Attendees / Staff / More) + `MoreSheet` bottom sheet listing desktop-only sections; mounted in the workspace layout and the monitor; rail + launch CTA hidden below `md`; `viewport-fit=cover`.
  • Monitor interim single-column stack below `md` (full board-8f layout comes in P6.2); Overview gains the phone-only readiness pipeline strip (board 8e); Home padding polish.
  • AppShell fix from live-device verification: the header's min-content (452px) overflowed 390px and inflated the mobile layout viewport — fixed with tighter phone gaps, `sm`-only version tag, truncating org name.

Verification

  • Full gates green: packages/ui 334/334; panel 1526 tests (2 pre-existing load flakes in untouched files pass 103/103 in isolation); typecheck; lint (verified via `rtk proxy`); build; EN/RU key parity.
  • Per-task spec+quality reviews on all 9 implementation tasks + final whole-branch review: 0 Critical / 0 Important; execution record in `.superpowers/sdd/progress.md`.
  • Live 390×844 walk against a real stack (docker db + Go backend, seeded): login → Home → Overview/strip → live Monitor over SSE (station staleness dot) → Attendees/Badge gates with working "Link copied" → More sheet → Staff, light + dark; desktop width restores rail/top-nav/real badge editor on the same URL.

Follow-ups (queued for P6.2 first commit)

  • `DesktopOnlyGate`: `.catch` on clipboard write (plain-http on-prem → `navigator.clipboard` undefined → false "copied").
  • `ReadinessStrip`: `MinusCircle` for skipped chips (match `ReadinessCell`).
  • sr-only label for the TabBar badge dot when its first consumer lands.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a responsive mobile workspace with bottom navigation for Overview, Monitor, Attendees, Staff, and More.
    • Added mobile readiness status chips and a desktop-only navigation sheet.
    • Added clear mobile gates for features best suited to desktop, including copy-link and return navigation.
    • Improved phone layouts, safe-area support, truncation, and single-column monitoring views.
    • Added English and Russian translations for the new mobile experience.
  • Bug Fixes

    • Fixed mobile header overflow at narrow viewport widths.
  • Tests

    • Added coverage for mobile navigation, readiness indicators, desktop gates, and responsive behavior.

Copilot AI review requested due to automatic review settings July 23, 2026 06:08

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added documentation Improvements or additions to documentation panel shared-ui labels Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@thevladbog, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c1870990-eaae-406a-8691-ce312d49c9bb

📥 Commits

Reviewing files that changed from the base of the PR and between fedd551 and 0a72748.

📒 Files selected for processing (15)
  • .superpowers/sdd/progress.md
  • packages/ui/src/components/desktop-only-gate.test.tsx
  • packages/ui/src/components/desktop-only-gate.tsx
  • packages/ui/src/components/sheet.tsx
  • packages/ui/src/components/tab-bar.test.tsx
  • packages/ui/src/components/tab-bar.tsx
  • panel/src/app/shell/AppShell.tsx
  • panel/src/features/workspace/EventTabBar.test.tsx
  • panel/src/features/workspace/EventTabBar.tsx
  • panel/src/features/workspace/ReadinessStrip.test.tsx
  • panel/src/features/workspace/ReadinessStrip.tsx
  • panel/src/features/workspace/WorkspaceOverview.tsx
  • panel/src/shared/i18n/en.json
  • panel/src/shared/i18n/ru.json
  • panel/src/shared/ui/DesktopOnly.tsx
📝 Walkthrough

Walkthrough

Adds the Panel P6.1 mobile foundation: responsive layouts, phone workspace navigation, desktop-only route gates, safe-area support, mobile readiness UI, localization, tests, and implementation documentation.

Changes

Panel mobile foundations

Layer / File(s) Summary
Mobile design and layout contracts
docs/design-briefs/customer-web-panel-mobile.md, docs/superpowers/plans/..., docs/superpowers/specs/..., panel/AGENTS.md, panel/src/shared/hooks/*
Defines mobile scope, breakpoint behavior, adaptive-layout rules, implementation tasks, and the tested useIsMobile() hook.
Shared mobile UI primitives
packages/ui/src/components/*, packages/ui/src/index.ts
Adds TabBar, TabBarItem, DesktopOnlyGate, safe-area sheet padding, exports, and component tests.
Desktop-only route gating
panel/src/shared/ui/*, panel/src/app/router.tsx, panel/src/shared/i18n/*
Gates selected routes below md, provides localized back and copy-link actions, and preserves event-aware navigation.
Phone workspace navigation and shell
panel/src/features/workspace/*, panel/src/features/monitor/MonitorPage.tsx, panel/src/app/shell/*, panel/index.html
Adds event tabs and the More sheet, hides desktop rail elements on phones, reflows monitor content, and enables safe-area viewport handling.
Mobile overview surfaces and validation
panel/src/features/workspace/ReadinessStrip*, WorkspaceOverview.tsx, HomePage.tsx, WorkspaceRail.tsx, .superpowers/sdd/progress.md
Adds the mobile readiness strip, responsive home spacing, rail labeling, related tests, and the recorded P6.1 verification sweep.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PanelRoute
  participant DesktopOnly
  participant DesktopOnlyGate
  participant Navigator
  PanelRoute->>DesktopOnly: render routed page
  DesktopOnly->>DesktopOnlyGate: render gate below md
  DesktopOnlyGate->>Navigator: copy current deep link or navigate back
Loading

Possibly related PRs

  • thevladbog/idento#59: Introduced the shared Sheet foundation extended here for mobile safe-area behavior.
  • thevladbog/idento#60: Introduced the panel shell markup updated here for responsive mobile layout.
  • thevladbog/idento#64: Introduced workspace routing and layout extended here with mobile navigation and gates.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main scope: P6.1 mobile companion foundations, bottom TabBar navigation, desktop-only Tier-3 gates, and phone shell changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/panel-p6.1-mobile-foundations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (2)
panel/src/features/workspace/ReadinessStrip.tsx (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid a workspace-to-home feature dependency.

ReadinessStrip is a workspace feature but imports STEP_LABEL_KEYS from features/home/ReadinessCell. Move this shared readiness vocabulary to a cross-cutting module so workspace changes do not depend on the Home feature implementation.

As per coding guidelines, cross-cutting code belongs in src/shared, while screen-level features remain isolated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@panel/src/features/workspace/ReadinessStrip.tsx` at line 4, Move the shared
STEP_LABEL_KEYS vocabulary out of features/home/ReadinessCell into an
appropriate src/shared module, update ReadinessCell and workspace ReadinessStrip
to import it from there, and remove the workspace-to-home dependency while
preserving existing behavior.

Source: Coding guidelines

panel/src/features/workspace/ReadinessStrip.test.tsx (1)

5-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep the readiness fixture type-checked.

as never bypasses validation of key, status, and count, so fixture typos can compile unnoticed. Import the generated ReadinessStep type and annotate the fixture as ReadinessStep[] instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@panel/src/features/workspace/ReadinessStrip.test.tsx` around lines 5 - 9,
Replace the unchecked `as never` assertion on the `STEPS` fixture with the
generated `ReadinessStep[]` type, importing `ReadinessStep` from its existing
source. Keep the fixture values unchanged while ensuring `key`, `status`, and
optional `count` are validated by TypeScript.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/ui/src/components/desktop-only-gate.tsx`:
- Around line 50-55: Update the desktop-only gate’s clipboard handler to await
navigator.clipboard.writeText, catch rejected or unavailable writes, set copied
state only after success, and receive localized failure feedback through props.
In packages/ui/src/components/desktop-only-gate.test.tsx lines 38-46, add a
rejected-write test verifying no success announcement and the provided failure
feedback. Update the pseudocode in
docs/superpowers/plans/2026-07-22-panel-p6.1-mobile-foundations.md lines 438-443
to reflect the awaited failure handling.

In `@packages/ui/src/components/sheet.tsx`:
- Around line 18-19: Update the SheetContent close control sizing so the
bottom-sheet variant uses size-11 when side === "bottom", while retaining size-6
for all other sheet sides.

In `@packages/ui/src/components/tab-bar.tsx`:
- Around line 49-55: Update the tab bar component’s badge API to require a
localized badgeLabel, then expose that label to assistive technologies and as a
visible non-color indicator alongside the warning dot. Remove aria-hidden from
the badge presentation and preserve the existing color styling while ensuring
the attention state is communicated through icon/text and color.

In `@panel/src/app/shell/AppShell.tsx`:
- Line 29: Update the version tag span in AppShell to use the md breakpoint
instead of sm, keeping it hidden below 768px and inline only when the desktop
header layout begins.

In `@panel/src/features/workspace/EventTabBar.tsx`:
- Around line 74-76: Add aria-expanded={moreOpen} to the button controlling the
More sheet in EventTabBar, preserving the existing click behavior and TabBarItem
rendering.

In `@panel/src/features/workspace/ReadinessStrip.tsx`:
- Around line 36-39: Update the icon rendering in ReadinessStrip’s step status
display so skipped steps use a distinct icon such as MinusCircle, while
completed steps continue using Check and not_done steps continue using Circle.
Preserve the existing labels, count rendering, and statusText accessibility
content.

In `@panel/src/features/workspace/WorkspaceOverview.tsx`:
- Line 70: Update the error branch in WorkspaceOverview’s readiness rendering to
require both readiness.isError and the absence of readiness.data before
replacing the “What’s next” card. Preserve cached readiness content during
background refetch failures while still showing the error state when no data is
available.

---

Nitpick comments:
In `@panel/src/features/workspace/ReadinessStrip.test.tsx`:
- Around line 5-9: Replace the unchecked `as never` assertion on the `STEPS`
fixture with the generated `ReadinessStep[]` type, importing `ReadinessStep`
from its existing source. Keep the fixture values unchanged while ensuring
`key`, `status`, and optional `count` are validated by TypeScript.

In `@panel/src/features/workspace/ReadinessStrip.tsx`:
- Line 4: Move the shared STEP_LABEL_KEYS vocabulary out of
features/home/ReadinessCell into an appropriate src/shared module, update
ReadinessCell and workspace ReadinessStrip to import it from there, and remove
the workspace-to-home dependency while preserving existing behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 96691664-51b7-47ed-8ce8-6e723c44f4c1

📥 Commits

Reviewing files that changed from the base of the PR and between 15844ca and fedd551.

📒 Files selected for processing (32)
  • .superpowers/sdd/progress.md
  • docs/design-briefs/customer-web-panel-mobile.md
  • docs/superpowers/plans/2026-07-22-panel-p6.1-mobile-foundations.md
  • docs/superpowers/specs/2026-07-20-panel-p6-mobile-companion-design.md
  • packages/ui/src/components/desktop-only-gate.test.tsx
  • packages/ui/src/components/desktop-only-gate.tsx
  • packages/ui/src/components/sheet.tsx
  • packages/ui/src/components/tab-bar.test.tsx
  • packages/ui/src/components/tab-bar.tsx
  • packages/ui/src/index.ts
  • panel/AGENTS.md
  • panel/index.html
  • panel/src/app/router.tsx
  • panel/src/app/shell/AppShell.tsx
  • panel/src/app/shell/OrgSwitcher.tsx
  • panel/src/features/home/HomePage.tsx
  • panel/src/features/monitor/MonitorPage.tsx
  • panel/src/features/workspace/EventTabBar.test.tsx
  • panel/src/features/workspace/EventTabBar.tsx
  • panel/src/features/workspace/EventWorkspaceLayout.test.tsx
  • panel/src/features/workspace/EventWorkspaceLayout.tsx
  • panel/src/features/workspace/MoreSheet.tsx
  • panel/src/features/workspace/ReadinessStrip.test.tsx
  • panel/src/features/workspace/ReadinessStrip.tsx
  • panel/src/features/workspace/WorkspaceOverview.tsx
  • panel/src/features/workspace/WorkspaceRail.tsx
  • panel/src/shared/hooks/useIsMobile.test.ts
  • panel/src/shared/hooks/useIsMobile.ts
  • panel/src/shared/i18n/en.json
  • panel/src/shared/i18n/ru.json
  • panel/src/shared/ui/DesktopOnly.test.tsx
  • panel/src/shared/ui/DesktopOnly.tsx

Comment thread packages/ui/src/components/desktop-only-gate.tsx
Comment thread packages/ui/src/components/sheet.tsx
Comment thread packages/ui/src/components/tab-bar.tsx
Comment thread panel/src/app/shell/AppShell.tsx Outdated
Comment thread panel/src/features/workspace/EventTabBar.tsx Outdated
Comment thread panel/src/features/workspace/ReadinessStrip.tsx Outdated
Comment thread panel/src/features/workspace/WorkspaceOverview.tsx
…bottom-sheet close, sr-only badge label, md version-tag cutoff, aria-expanded, MinusCircle skipped, retain cached readiness
@thevladbog

Copy link
Copy Markdown
Owner Author

Nitpicks: the as never fixture in ReadinessStrip.test.tsx is now typed as the generated ReadinessStep[] (382a69e). The STEP_LABEL_KEYS move to src/shared is deliberately not done in this PR: the cross-feature import is a pre-existing pattern shared with WorkspaceRail and WorkspaceOverview since P1.2/P2, and relocating the readiness vocabulary touches four files outside this diff — queued as a standalone refactor for the next phase that edits this area (P6.2 touches Overview/monitor anyway).

@thevladbog
thevladbog merged commit 1e62b86 into main Jul 23, 2026
34 checks passed
@thevladbog
thevladbog deleted the feature/panel-p6.1-mobile-foundations branch July 23, 2026 08:29
thevladbog added a commit that referenced this pull request Jul 23, 2026
…b-bar attention dot (#108)

* docs: P6.2 live-ops plan

* panel: move STEP_LABEL_KEYS to shared/lib (PR #106 follow-up, P6.2 T1)

* panel: remove dead ReadinessStep type alias left by STEP_LABEL_KEYS move (P6.2 T1 fix)

* panel: monitor staleness vocabulary — dim stale body, amber counter, live-region announcer (board 8p, P6.2 T2)

* panel: monitor announcer stays silent while connecting instead of falsely claiming stream error (P6.2 T2 fix)

* panel: monitor phone header + XXL totals typography (board 8f, P6.2 T3)

* panel: Monitor tab attention dot from cached station staleness (board 8a, P6.2 T4)

* panel: LiveStrip phone polish (board 8d, P6.2 T5 code)

* panel: P6.2 ledger entry (live ops complete)

* panel: P6.2 final review record (ready to merge)

* panel: recheck the tab-bar attention dot on a timer so pure clock drift lights it (PR #108 review)

The cache-only Monitor-tab dot only recomputed Date.now() at render time, so a
station could cross STATION_STALE_MS with no cache update and no other
re-render — the dot would stay off indefinitely on a page like Overview where
nothing else triggers a re-render. Added a 10s local recheck tick (no network,
enabled:false untouched) and a regression test that advances fake time past
the staleness threshold with the cache held fixed.

* panel: ledger — PR #108 review round 1 resolved

---------

Co-authored-by: CI Bot <ci@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation panel shared-ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants