panel: P6.2 live ops — monitor phone layout, staleness vocabulary, tab-bar attention dot - #108
Conversation
…ove (P6.2 T1 fix)
…live-region announcer (board 8p, P6.2 T2)
…sely claiming stream error (P6.2 T2 fix)
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughP6.2 centralizes readiness labels, adds responsive monitor stream-state and totals UI, introduces cached station-staleness attention badges, and polishes LiveStrip phone styling. Tests and progress documentation cover the new behavior and verification steps. ChangesLive Ops interface
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant MonitorStream
participant MonitorPage
participant MonitorBody
participant StreamAnnouncer
MonitorStream->>MonitorPage: stream status update
MonitorPage->>MonitorBody: apply live or degraded opacity
MonitorPage->>StreamAnnouncer: publish polite status announcement
sequenceDiagram
participant EventTabBar
participant MonitorSnapshotCache
participant stationStaleness
participant MonitorTab
EventTabBar->>MonitorSnapshotCache: read cached snapshot
EventTabBar->>stationStaleness: evaluate station timestamps
stationStaleness-->>EventTabBar: stale station result
EventTabBar->>MonitorTab: render or omit attention badge
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
panel/src/features/workspace/EventTabBar.tsx (1)
7-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider moving
stationStaleness/STATION_STALE_MStoshared/lib.
EventTabBar(workspace feature) reaches into../monitor/livenessfor cross-cutting staleness logic. This is the same cohesion issue this very PR already fixed forSTEP_LABEL_KEYS(moved toshared/lib"as a follow-up to PR#106" per the plan). Since staleness detection is now consumed by two features (monitor + workspace), it fits the shared-lib precedent better than living underfeatures/monitor.🤖 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/EventTabBar.tsx` around lines 7 - 8, Move the shared staleness symbols `stationStaleness` and `STATION_STALE_MS` from the monitor feature’s `liveness` module into `shared/lib`, then update both monitor and `EventTabBar` imports to use the new shared location while preserving their existing behavior.
🤖 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 `@docs/superpowers/plans/2026-07-23-panel-p6.2-live-ops.md`:
- Around line 377-389: The cache-only EventTabBar staleness indicator must
re-evaluate when STATION_STALE_MS elapses, without enabling network fetching.
Add a local timeout/state tick scheduled for the next station staleness
deadline, use that tick when computing Date.now() and hasStaleStation, and clean
up the timer appropriately; add a test that advances Date.now() while keeping
the cached snapshot unchanged and verifies the attention dot appears.
---
Nitpick comments:
In `@panel/src/features/workspace/EventTabBar.tsx`:
- Around line 7-8: Move the shared staleness symbols `stationStaleness` and
`STATION_STALE_MS` from the monitor feature’s `liveness` module into
`shared/lib`, then update both monitor and `EventTabBar` imports to use the new
shared location while preserving their 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: 4dc5090a-4c84-48bb-8069-fc4228f651b5
📒 Files selected for processing (16)
.superpowers/sdd/progress.mddocs/superpowers/plans/2026-07-23-panel-p6.2-live-ops.mdpanel/src/features/home/LiveStrip.tsxpanel/src/features/home/ReadinessCell.tsxpanel/src/features/monitor/MonitorPage.test.tsxpanel/src/features/monitor/MonitorPage.tsxpanel/src/features/monitor/TotalsCard.test.tsxpanel/src/features/monitor/TotalsCard.tsxpanel/src/features/workspace/EventTabBar.test.tsxpanel/src/features/workspace/EventTabBar.tsxpanel/src/features/workspace/ReadinessStrip.tsxpanel/src/features/workspace/WorkspaceOverview.tsxpanel/src/features/workspace/WorkspaceRail.tsxpanel/src/shared/i18n/en.jsonpanel/src/shared/i18n/ru.jsonpanel/src/shared/lib/readinessLabels.ts
…ft 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.
Summary
Second phase of the P6 mobile companion (spec §6, plan, design boards
Idento Panel Mobile.dc.html8d/8f/8p): the live monitor becomes a first-class phone surface with an honest staleness vocabulary, plus a promised PR #106 follow-up. Zero backend/OpenAPI changes.shared/lib: promised follow-up from PR panel: P6.1 mobile companion foundations — bottom TabBar nav, Tier-3 gates, phone shell #106's review — the readiness label vocabulary moved out of thehomefeature into a cross-cutting module, unblocking the workspace-to-home dependency CodeRabbit flagged.aria-liveregion announces the current stream state — explicitly silent during the transient "connecting" state on every page load, never falsely claiming a stream error.md(the tab bar owns phone nav), XXL glanceable totals number, rate/peak/est stats as a spread row.enabled: false), the tab bar never triggers monitor network traffic itself. Uses the existing sr-only badge API from P6.1.md.Verification
rtk proxy); build.getComputedStyle), amber counter, and live-region announcement all appear correctly; confirmed full recovery on restart; confirmed the Monitor tab's attention dot lights end-to-end from a genuinely stale seeded station.Follow-ups (queued for P6.3 first commit)
enabled: falsenever fires a fetch (currently verified by manual/reviewer inspection of the underlying query-client mechanism, not a dedicated test).dataUpdatedAtso it reflects real station staleness rather than time-since-last-visited-monitor.MonitorPage'seventQuerydoesn't get the same retain-last-known-good/SSE-revival treatment assnapshotQuery— noted from the live walk, pre-existing from an earlier phase, not introduced by this branch.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes