Always show the personal group's own row, even with no places #186

Merged
rob merged 1 commit from feature/task-247-personal-group-row into main 2026-08-17 06:56:58 +00:00
Owner

Task 247. Reverses part of ADR-0095 (Rob's own product call from live use, task 241's investigation under PR #185): PlaceAccordion.HasNothingToShow now gates the flat "You have no places yet." message on the merged row set itself (AccordionGroups.Count == 0) rather than on place count plus non-personal groups, so a brand-new account's personal group gets its own named row — heading, visibility toggle, edit-group button — from first sign-in, exactly like any other placeless group has since task 183.

HasNothingToShow survives, narrowed: it's still reachable when CallerGroupsState fails to load and the caller has no places either, so the flat message doesn't vanish into a blank component on that path. Proved reachable with a new test (PlaceAccordion_NoPlacesAndCallerGroupsFailedToLoad_ShowsTheFlatEmptyMessage), and the reversed test (PlaceAccordion_AccountHasOnlyItsPersonalGroupAndNoPlaces_ShowsThePersonalGroupsOwnRow) was watched red against the old gate before the fix, green after.

No change to add-a-place gating (EligibleGroups), which was already correct.

ADR-0161 records the decision and partially supersedes ADR-0095; ADR-0095's own Status/Partially superseded by metadata updated to match (no other edits to its frozen body). README index regenerated via scripts/regenerate-adr-readme.cs.

Task 247. Reverses part of ADR-0095 (Rob's own product call from live use, task 241's investigation under PR #185): `PlaceAccordion.HasNothingToShow` now gates the flat "You have no places yet." message on the merged row set itself (`AccordionGroups.Count == 0`) rather than on place count plus non-personal groups, so a brand-new account's personal group gets its own named row — heading, visibility toggle, edit-group button — from first sign-in, exactly like any other placeless group has since task 183. `HasNothingToShow` survives, narrowed: it's still reachable when `CallerGroupsState` fails to load and the caller has no places either, so the flat message doesn't vanish into a blank component on that path. Proved reachable with a new test (`PlaceAccordion_NoPlacesAndCallerGroupsFailedToLoad_ShowsTheFlatEmptyMessage`), and the reversed test (`PlaceAccordion_AccountHasOnlyItsPersonalGroupAndNoPlaces_ShowsThePersonalGroupsOwnRow`) was watched red against the old gate before the fix, green after. No change to add-a-place gating (`EligibleGroups`), which was already correct. ADR-0161 records the decision and partially supersedes ADR-0095; ADR-0095's own Status/`Partially superseded by` metadata updated to match (no other edits to its frozen body). README index regenerated via `scripts/regenerate-adr-readme.cs`.
Always show the personal group's own row, even with no places
All checks were successful
CI / build (pull_request) Successful in 4m0s
CI / container-images (pull_request) Successful in 3s
CI / e2e (pull_request) Successful in 4m20s
594398ede4
rob force-pushed feature/task-247-personal-group-row from 594398ede4
All checks were successful
CI / build (pull_request) Successful in 4m0s
CI / container-images (pull_request) Successful in 3s
CI / e2e (pull_request) Successful in 4m20s
to 7cfe34f5df
All checks were successful
CI / build (pull_request) Successful in 6m46s
CI / container-images (pull_request) Successful in 27s
CI / e2e (pull_request) Successful in 5m0s
2026-08-17 06:39:57 +00:00
Compare
rob left a comment

Verdict: mergeable

Checked the points from the review brief:

  • HasNothingToShow (AccordionGroups.Count == 0) is genuinely reachable, not dead code: AccordionGroups is empty exactly when both PlacesState.Groups and CallerGroups.Groups are empty, which the new CallerGroupsFailedToLoad test forces via a stubbed 500. Confirmed by hand against the old gate too — that test's assertions (Find("button.accordion-header") etc.) throw against unpatched source, so the red-before-green claim holds.
  • The failed-load path shows the flat "You have no places yet." message rather than an error — but that's unchanged: the old gate (PlacesState.Groups.Count == 0 && !CallerGroups.Groups.Any(g => !g.IsPersonal)) evaluates the same way when CallerGroups.Groups is empty from a load failure. Not a regression from this PR, and out of scope for task 247, but worth a ticket at some point — a failed groups load is indistinguishable from an empty account.
  • Reversed test renamed and replaced correctly, asserts the row's name and visibility toggle as task 247 required.
  • No regression path for accounts with places/shared groups — HasNothingToShow only matters when AccordionGroups is empty, so any account with ≥1 group is untouched by this gate change.
  • OidcSignInJourneyTests only asserts the "Add a place" button, gated on EligibleGroups (untouched) — unaffected either way.
  • Empty personal-group row follows the same treatment as task 183's shared-group empty row (same @if (group.Places.Count > 0) branch, no personal-group special-casing).
  • EligibleGroups gating untouched.
  • ADR-0161's Partially supersedes call is correct against ADR-0107: ADR-0095's account-wide-empty paragraph was a decision made in frozen prose (and an alternative explicitly rejected), not a question left open for a later record — Answered by genuinely doesn't apply, and the PR's own alternatives-considered section shows that was checked, not assumed. The diff to ADR-0095 touches only the Status/Partially superseded by fields; body untouched.
  • README row for ADR-0156 (PR #184) is intact; diff shows only the 0095 status-column edit and the new 0161 row, consistent with a scripted regeneration.

No blocking issues found.

Verdict: mergeable Checked the points from the review brief: - `HasNothingToShow` (`AccordionGroups.Count == 0`) is genuinely reachable, not dead code: `AccordionGroups` is empty exactly when both `PlacesState.Groups` and `CallerGroups.Groups` are empty, which the new `CallerGroupsFailedToLoad` test forces via a stubbed 500. Confirmed by hand against the old gate too — that test's assertions (`Find("button.accordion-header")` etc.) throw against unpatched source, so the red-before-green claim holds. - The failed-load path shows the flat "You have no places yet." message rather than an error — but that's unchanged: the old gate (`PlacesState.Groups.Count == 0 && !CallerGroups.Groups.Any(g => !g.IsPersonal)`) evaluates the same way when `CallerGroups.Groups` is empty from a load failure. Not a regression from this PR, and out of scope for task 247, but worth a ticket at some point — a failed groups load is indistinguishable from an empty account. - Reversed test renamed and replaced correctly, asserts the row's name and visibility toggle as task 247 required. - No regression path for accounts with places/shared groups — `HasNothingToShow` only matters when `AccordionGroups` is empty, so any account with ≥1 group is untouched by this gate change. - `OidcSignInJourneyTests` only asserts the "Add a place" button, gated on `EligibleGroups` (untouched) — unaffected either way. - Empty personal-group row follows the same treatment as task 183's shared-group empty row (same `@if (group.Places.Count > 0)` branch, no personal-group special-casing). - `EligibleGroups` gating untouched. - ADR-0161's `Partially supersedes` call is correct against ADR-0107: ADR-0095's account-wide-empty paragraph was a decision made in frozen prose (and an alternative explicitly rejected), not a question left open for a later record — `Answered by` genuinely doesn't apply, and the PR's own alternatives-considered section shows that was checked, not assumed. The diff to ADR-0095 touches only the `Status`/`Partially superseded by` fields; body untouched. - README row for ADR-0156 (PR #184) is intact; diff shows only the 0095 status-column edit and the new 0161 row, consistent with a scripted regeneration. No blocking issues found.
rob merged commit caa287c730 into main 2026-08-17 06:56:58 +00:00
rob deleted branch feature/task-247-personal-group-row 2026-08-17 06:56:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rob/PlaceMark!186
No description provided.