desktop: vertically center dashboard Tasks/Goals rows#6906
Conversation
When the Goals card determines the row height (more goals than tasks), the Tasks card's rows now float to the middle of the cell instead of pinning to the top, matching the visual balance the user asked for. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror of the TasksWidget change so the Goals card behaves the same way when the Tasks card determines the row height. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR vertically centers the content rows inside the Confidence Score: 5/5Safe to merge — small, self-contained layout-only change with no logic or data mutations. All changes are purely layout adjustments using a standard SwiftUI vertical-centering pattern. No logic, state, or data handling is modified, and both the empty and populated branches are handled consistently in both widgets. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Dashboard Row] --> B[TasksWidget]
A --> C[GoalsWidget]
B --> B1{totalTaskCount == 0?}
B1 -- Yes --> B2["VStack(spacing:0)\n Spacer(minLength:0)\n Empty state icon+label\n Spacer(minLength:0)\n.frame(maxHeight:.infinity)"]
B1 -- No --> B3["VStack(spacing:0)\n Spacer(minLength:0)\n Task rows (prefix 3)\n 'View all' button\n Spacer(minLength:0)\n.frame(maxHeight:.infinity)"]
C --> C1{goals.isEmpty?}
C1 -- Yes --> C2["VStack(spacing:0)\n Spacer(minLength:0)\n AI Generate button\n Spacer(minLength:0)\n.frame(maxHeight:.infinity)"]
C1 -- No --> C3["VStack(spacing:0)\n Spacer(minLength:0)\n GoalRowView list\n Spacer(minLength:0)\n.frame(maxHeight:.infinity)"]
Reviews (1): Last reviewed commit: "desktop: changelog for vertically center..." | Re-trigger Greptile |
…6906) ## Summary Follow-up to BasedHardware#6903. With the cards now equalized to the taller intrinsic height, the shorter card's rows pinned to the top, leaving a visible gap below. This PR centers the rows vertically inside each card so they float to the middle when the sibling card is taller. Wraps the existing row VStack in `VStack(spacing: 0) { Spacer(minLength: 0); … ; Spacer(minLength: 0) }.frame(maxHeight: .infinity)` for both empty and non-empty branches in `TasksWidget` and `GoalsWidget`. ## Test plan - [ ] Dashboard with 2 tasks and 4 goals — Tasks rows centered vertically; Goals fills. - [ ] Dashboard with 4 tasks and 1 goal — Goals row centered; Tasks fills. - [ ] Empty state on either side — empty content stays centered. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Follow-up to #6903. With the cards now equalized to the taller intrinsic height, the shorter card's rows pinned to the top, leaving a visible gap below. This PR centers the rows vertically inside each card so they float to the middle when the sibling card is taller.
Wraps the existing row VStack in
VStack(spacing: 0) { Spacer(minLength: 0); … ; Spacer(minLength: 0) }.frame(maxHeight: .infinity)for both empty and non-empty branches inTasksWidgetandGoalsWidget.Test plan
🤖 Generated with Claude Code