Repository navigation
feat(desktop): clean up the workspaces board cards - #7150
Conversation
… components The board card is about to share the list row's state glyph, so it moves from the row's private components folder up to the highest shared parent. No behaviour change. Claude-Session: https://claude.ai/code/session_01BjVLqU1kEE6SQqKSYem9ax
Rework the board card after Linear's board anatomy: a muted project line, the state glyph beside a medium-weight title, a branch line only when it says something the title doesn't (the list row's rule), and outlined property pills for PR, diff churn and archive state with the activity age on the right. Columns get a surface one step above the page so cards read as items in a lane. "This device" no longer repeats on every local card. WorkspaceStateGlyph moves up to v2-workspaces/components since the board card and the list row now share it. No new i18n strings: the card reuses the row's existing ids. Claude-Session: https://claude.ai/code/session_01BjVLqU1kEE6SQqKSYem9ax
…age to the header Age sits top right beside the project line, the state glyph takes the footer's right slot after the pills, and the card inset grows to 14/12px. The title and branch line lose their leading glyph indent. Claude-Session: https://claude.ai/code/session_01BjVLqU1kEE6SQqKSYem9ax
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
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 |
Greptile SummaryThe PR simplifies desktop workspace board cards and aligns their status, branch, activity, and diff metadata with the list layout.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified. The presentation changes preserve the list layout’s branch and status semantics, and the shared glyph remains total over the supported workspace states.
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesBoard/components/V2WorkspacesBoardCard/V2WorkspacesBoardCard.tsx | Reworks card metadata and status presentation; no actionable correctness issue was established. |
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesBoard/components/V2WorkspacesBoardColumn/V2WorkspacesBoardColumn.tsx | Applies lane surface, spacing, and typography changes without altering board behavior. |
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx | Updates the state-glyph import to its shared location. |
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/WorkspaceStateGlyph/WorkspaceStateGlyph.tsx | Relocates the existing state glyph unchanged for reuse by both layouts. |
Reviews (1): Last reviewed commit: "feat(desktop): move the board card's sta..." | Re-trigger Greptile
There was a problem hiding this comment.
1 issue found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesBoard/components/V2WorkspacesBoardCard/V2WorkspacesBoardCard.tsx">
<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesBoard/components/V2WorkspacesBoardCard/V2WorkspacesBoardCard.tsx:38">
P3: The board adds a second `formatCount` implementation identical to the list row’s helper. Extract this formatter into a shared utility and import it in both surfaces so churn formatting cannot drift.</violation>
</file>
Architecture diagram
sequenceDiagram
participant User as Desktop User
participant Board as Workspaces Board
participant Columns as Board Columns
participant Card as Board Card
participant List as Workspaces List Row
participant Data as Accessible Workspaces Hook
participant Utils as Workspace Utilities
participant Shared as Workspace State Glyph
participant Menu as Workspace Context Menu
Note over Board,Data: Current-state desktop workspace rendering
Board->>Data: Request accessible workspaces
Data-->>Board: Workspace records and visible columns
Board->>Columns: Render columns with workspace groups
Columns->>Columns: Apply lane surface, spacing, and counts
loop For each workspace in a column
Columns->>Card: Render workspace data
Card->>Utils: Compute activity timestamp
Utils-->>Card: Relative activity age
Card->>Shared: Render workspace state
Shared-->>Card: Review, working, or column state glyph
alt Main workspace
Card->>Card: Show project icon and main-workspace laptop tooltip
else Remote workspace
Card->>Card: Show project icon, monitor icon, and host name
else Local non-main workspace
Card->>Card: Show project icon only
end
alt Branch differs from workspace name and workspace is not a session
Card->>Card: Show branch metadata line
else Branch is redundant or workspace is a session
Card->>Card: Omit branch metadata line
end
alt Pull request exists
Card->>Card: Show PR number and checks status
end
alt Diff statistics contain changes
Card->>Card: Show formatted additions and deletions
end
alt Workspace is merged or archived
Card->>Card: Show terminal status and muted title
end
end
Board->>List: Render list layout from the same workspace records
List->>Utils: Compute activity timestamp
Utils-->>List: Relative activity age
List->>Shared: Render the same workspace state glyph
Shared-->>List: Consistent state indicator
User->>Card: Click workspace
alt Workspace is active
Card->>Card: Invoke open handler
Card-->>User: Open workspace
else Workspace is archived
Card->>Card: Keep card disabled
end
User->>Card: Open context menu
Card->>Menu: Provide workspace and action handlers
Menu-->>User: Show workspace actions
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| /** 181909 → "181.9k" — keeps outlier churn from blowing out the pill. */ | ||
| function formatCount(count: number): string { |
There was a problem hiding this comment.
P3: The board adds a second formatCount implementation identical to the list row’s helper. Extract this formatter into a shared utility and import it in both surfaces so churn formatting cannot drift.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesBoard/components/V2WorkspacesBoardCard/V2WorkspacesBoardCard.tsx, line 38:
<comment>The board adds a second `formatCount` implementation identical to the list row’s helper. Extract this formatter into a shared utility and import it in both surfaces so churn formatting cannot drift.</comment>
<file context>
@@ -30,6 +34,15 @@ export function V2WorkspacesBoardCard({
}
+/** 181909 → "181.9k" — keeps outlier churn from blowing out the pill. */
+function formatCount(count: number): string {
+ if (count < 10_000) return String(count);
+ return `${(count / 1000).toFixed(1).replace(/\.0$/, "")}k`;
</file context>
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Follows #7142 (merged). Replaces #7146, which GitHub closed when that PR's base branch was deleted on merge; this is the same three commits rebased onto main, with the card's Lingui calls updated to the English-text-as-id convention from #7092.
What changed
The board cards were carrying a lot of repeated chrome: "This device" on every local card, the branch name printed under a title that was already the branch name, and unstyled metadata. This reworks the card after Linear's board anatomy (checked on Mobbin) while keeping the page's existing vocabulary.
Card
WorkspaceStateGlyphthe list row uses, so the green review dot, the working spinner, and the column pies read the same on both layouts.+adds −delschurn when present, Merged/Deleted for tombstones, with the activity age on the right. Age now tracks activity like the list, not creation.Column
bg-muted/30) with the header inside, so cards read as items in a column. Card gap 8px, lane gap 12px. Works in both themes: page < lane < card.Refactor commit:
WorkspaceStateGlyphmoves from the row's private folder up tov2-workspaces/componentssince two components share it now.Checks
bun run typecheck(apps/desktop): exit 0bun testfor the workspaces page directory: 17 passbun run check:i18n: exit 0, no catalog changes. The card reuses the row's existing ids, so no new strings.A later commit moves the age to the header's right slot and the state glyph to the footer's right slot, and widens the card inset to 14/12px.
https://claude.ai/code/session_01BjVLqU1kEE6SQqKSYem9ax
Summary by cubic
Reworks the workspaces board cards and columns after Linear's board anatomy so cards read as items in a lane and drop repeated chrome like "This device" and the redundant branch line.
What changed
WorkspaceStateGlyphmoves up tov2-workspaces/componentssince the card and list row share it.Written for commit d76d229. Summary will update on new commits.