feat(command): Command Center page, activity feed + nav#122
Conversation
New /command home: the Decision Queue (getDecisionQueue) rendered as prioritized cards with per-item open + dismiss (client island calling the dismiss server action), a count badge, and empty state; an Activity feed from the latest Signal rows via the shadcn timeline. Command Center is the first VIEWS entry and the post-login landing (login + OAuth callback redirect to /command; /dashboard stays reachable). Pure presentation helpers (decisionKindStyle/isInternalUrl/relativeAge) in src/lib/decision-ui.ts with tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 42 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a new server-rendered ChangesCommand Center feature
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant CommandCenterPage
participant requireUser
participant getDecisionQueue
participant PrismaSignal
Browser->>CommandCenterPage: GET /command
CommandCenterPage->>requireUser: requireUser()
requireUser-->>CommandCenterPage: authenticated user
CommandCenterPage->>getDecisionQueue: getDecisionQueue()
getDecisionQueue-->>CommandCenterPage: decisions
CommandCenterPage->>PrismaSignal: findMany(orderBy occurredAt, take 15)
PrismaSignal-->>CommandCenterPage: signals
CommandCenterPage-->>Browser: Decision queue + Activity timeline
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/components/app-sidebar.tsx (1)
101-104: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueLogo icon still
LayoutDashboarddespite link now pointing to/command.Minor inconsistency: the header link now navigates to
/command, but the icon next to "Orchid" remainsLayoutDashboard, which visually still implies "dashboard".🤖 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 `@src/components/app-sidebar.tsx` around lines 101 - 104, The header link in app-sidebar still uses LayoutDashboard even though it now points to /command, so update the icon in the Link block near the Orchid brand to match the new command-style navigation. Replace the current LayoutDashboard reference with the appropriate icon used elsewhere for command/terminal semantics, keeping the Link structure and styling intact.
🤖 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 `@src/app/`(app)/command/page.tsx:
- Around line 67-70: The two inline empty-state placeholders in the command page
should use the shared EmptyState block instead of plain <p> text. Update the
empty branches in the page component to render the existing empty-state block
used elsewhere in the app, following the same pattern as audits, and keep the
messaging/content consistent for both cases.
In `@src/components/decision-dismiss-button.tsx`:
- Around line 12-22: The dismiss button’s transition callback is synchronous, so
`pending` can reset before `dismissDecision` finishes and its result may be
ignored. Update `DecisionDismissButton` to pass an async callback to
`startTransition`, await `dismissDecision(dedupeKey)` inside it, and handle any
failure or result state there so the button remains disabled while the action is
in flight.
---
Nitpick comments:
In `@src/components/app-sidebar.tsx`:
- Around line 101-104: The header link in app-sidebar still uses LayoutDashboard
even though it now points to /command, so update the icon in the Link block near
the Orchid brand to match the new command-style navigation. Replace the current
LayoutDashboard reference with the appropriate icon used elsewhere for
command/terminal semantics, keeping the Link structure and styling intact.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e3ec4a56-ff25-4ea7-8b02-b1306ba82361
📒 Files selected for processing (7)
src/app/(app)/command/page.tsxsrc/app/api/auth/callback/route.tssrc/app/login/page.tsxsrc/components/app-sidebar.tsxsrc/components/decision-dismiss-button.tsxsrc/lib/decision-ui.test.tssrc/lib/decision-ui.ts
) Both empty states (decision queue, activity) now render the shared shadcnstudio empty-state-02 block at the column level (no card nesting) for UI consistency with /audits. The dismiss button's startTransition callback is now async and awaits dismissDecision, so the button stays disabled until the action settles and a failure message surfaces via the button title instead of being dropped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@CodeRabbit any more findings? if not, please approve |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check existing review comments made by coderabbitai on this PR to see if there are open/unresolved findings
gh pr view 122 --repo apps3k-com/orchid-dev-dashboard --json reviews,comments -q '.reviews[] | {author: .author.login, body: .body, state: .state}' | head -100
echo "---review comments---"
gh api repos/apps3k-com/orchid-dev-dashboard/pulls/122/comments --paginate | jq -r '.[] | "\(.user.login): \(.path)#\(.line // .original_line) :: \(.body[0:200])"'Length of output: 7687 🏁 Script executed: #!/bin/bash
sed -n '1,90p' "src/app/(app)/command/page.tsx"
echo "---"
cat -n src/components/decision-dismiss-button.tsx
echo "---sidebar icon check---"
sed -n '1,20p;95,110p' src/components/app-sidebar.tsxLength of output: 6261 Both prior findings are confirmed fixed in commit 09dc3a7 (the dismiss button now awaits
[approve] ヽ(•‿•)ノ |
Closes #117
Final increment of Phase A (epic #110): the Command Center UI on top of the event spine (#118) + decision-queue backend (#119).
What
/commandpage (force-dynamic,requireUser): the Decision Queue rendered as prioritized cards (kind badge · repo · age · title · optional detail) with per-item open (internal route or external GitHub link) and dismiss (a small client island calling thedismissDecisionserver action), a count badge, and an empty state.Signalrows via the shadcntimeline, severity-badged.VIEWSentry (Inbox icon) and the post-login landing —/login(already-signed-in) and the OAuth callback redirect to/command;/dashboardstays reachable via the nav.src/lib/decision-ui.ts(decisionKindStyle,isInternalUrl,relativeAge) with unit tests.Verification
pnpm check/pnpm test(177) / docstring gate — all green./command→ 307 →/login(auth guard; compiles with no 500),/dashboardstill 307/reachable; the worker registered theingest:githubtask. Logged-in browser render check to follow.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests