feat(ui): wire StatsBar component into App layout#112
Conversation
Integrate the existing StatsBar component into the main content area, showing pending reviews, open PRs, issues, active workspaces counts and sync timestamp. Hidden in workspace mode. Closes #100
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe App layout is restructured to conditionally render a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR wires the pre-existing Key changes:
Confidence Score: 4/5Safe to merge; changes are small, well-tested, and use established flexbox patterns. The implementation is straightforward and the tests cover both the visible and hidden cases. The flex layout changes follow standard Tailwind patterns. Score is 4 rather than 5 because layout changes can have visual edge cases difficult to catch in unit tests, and the workspace-mode h-full wrapper is a structural change that could affect WorkspaceView's internal scroll in some environments. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App renders] --> B{authQuery loading?}
B -- yes --> C[Checking auth…]
B -- no --> D{authQuery error?}
D -- yes --> E[Error message]
D -- no --> F{connected?}
F -- no --> G[AuthGate]
F -- yes --> H[Main layout: flex h-screen]
H --> I[aside: Sidebar]
H --> J{isWorkspace?}
J -- yes --> K["main: flex-1"]
J -- no --> L["main: flex min-w-0 flex-1 flex-col"]
L --> M[StatsBar]
L --> N["div: min-h-0 flex-1 overflow-y-auto"]
K --> O["div: h-full"]
N --> P[ChunkErrorBoundary / Suspense / MainContent]
O --> P
Reviews (1): Last reviewed commit: "feat(ui): wire StatsBar component into A..." | Re-trigger Greptile |
Summary
StatsBarcomponent intoApp.tsxmain content areaWorkspaceStatusBar)min-h-0 flex-1 overflow-y-autofor scroll handlingChanges
src/App.tsx— Import + render<StatsBar />aboveMainContent, conditional on!isWorkspacesrc/App.test.tsx— AdduseGitHubDatamock + 2 integration tests (stats bar visible/hidden)Test plan
npx vitest run)Closes #100
Summary by cubic
Wired the
StatsBarinto the main app so dashboard views show pending reviews, open PRs, issues, active workspaces, and last sync time. Keeps workspace mode unchanged and makes the content area scrollable.StatsBarabove dashboardMainContent; hidden in workspace mode (usesWorkspaceStatusBar).min-h-0 flex-1 overflow-y-autofor proper scrolling.App.test.tsxtests with auseGitHubDatamock to verify stats bar visibility on dashboard and absence in workspace.Written for commit 9da64cd. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
New Features
Tests