Skip to content

Keep repository indicators in sync with loaded status - #23089

Merged
tidy-dev merged 1 commit into
developmentfrom
tidy-dev-fix-issue-22997
Oct 30, 2026
Merged

tidy-dev merged 1 commit into
developmentfrom
tidy-dev-fix-issue-22997

Conversation

@tidy-dev

@tidy-dev tidy-dev commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #22997

Description

  • Synchronize the repository indicator whenever _loadStatus() loads status, before publishing application state. Previously, a History → Changes refresh could display modified files while the repository picker still showed no uncommitted-changes dot.
  • Clear and publish the cached indicator when status is unavailable, remove the redundant update from _refreshRepository(), and make the synchronous indicator helper explicitly synchronous.
  • Add regression coverage through the actual section-change/status-loading path for clean → dirty → clean transitions, ahead/behind values, and unavailable status. This does not change background refresh timing for non-selected repositories.

Screenshots

Both captures follow the same Playwright scenario: start with a clean repository, select History, modify a tracked file externally without changing window focus, switch to Changes, verify Desktop displays the added line, and open the repository picker.

Before After
Before: modified-file diff is visible but the repository row has no dot After: the same diff is visible and the repository row has a blue dot

Validation

Validation and after-artifacts cover the code committed as db2e01cd66ddd3dac94d4cd902314aa6835b0bde; the baseline captures use unchanged production code. The temporary Playwright spec was removed after capture and is not included in this PR.

  • yarn test app/test/unit/stores/app-store-indicators-test.ts app/test/unit/ui/repository-list-item-test.tsx — passed, 9 tests. Both new behavioral regressions were observed failing before the fix.
  • yarn test:e2e:build:unpackaged — passed for baseline and fixed builds, with existing SDK/bundler warnings.
  • INDICATOR_PHASE=before DESKTOP_E2E_APP_MODE=unpackaged npx playwright test --config app/test/e2e/playwright.config.ts app/test/e2e/issue-22997.e2e.ts — passed; confirmed Desktop recognized the changed file while the visible repository row lacked its dot.
  • INDICATOR_PHASE=after DESKTOP_E2E_APP_MODE=unpackaged npx playwright test --config app/test/e2e/playwright.config.ts app/test/e2e/issue-22997.e2e.ts — passed; confirmed the dot appears for the recognized change and clears after restoring the file and reloading Changes.
  • yarn lint:fix and yarn lint — passed.
  • yarn tsc --noEmit -p tsconfig.json — passed.
  • yarn test — 2,282 passed, 6 failed, 2 skipped. The same six failures were reproduced with production files unchanged using yarn test app/test/unit/git/checkout-test.ts app/test/unit/git/push-test.ts app/test/unit/git/rev-parse-test.ts app/test/unit/parse-files-to-be-overwritten-test.ts: uninitialized-submodule checkout, three local-remote push tests, initialized bare-repository detection, and parsing files from a pull error.

Team-authored review

Evidence: See Screenshots and Validation.

Review path: Lightweight review. This synchronizes existing status-display state; it does not change authentication, permissions, destructive Git operations, or release infrastructure.

Release notes

Notes: [Fixed] Keep the repository list's uncommitted-changes indicator in sync when refreshing the Changes tab.

Update the repository indicator whenever status is loaded, including Changes-tab refreshes, and publish removal when status is unavailable.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: c1803488-50c0-4ac9-870a-be2b126f0664
Copilot AI balanced review requested due to automatic review settings October 28, 2026 01:34
@tidy-dev
tidy-dev requested a review from a team as a code owner October 28, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the repository indicator synchronization changes.

No open issues 🎉

What changed in this PR

Addresses #22997 by keeping repository picker indicators synchronized with status loaded for the Changes tab, without changing background refresh timing for other repositories.

Changes:

  • Updates indicators inside _loadStatus() before publishing state, and clears cached indicators when status is unavailable.
  • Removes the redundant refresh-path update and makes the indicator helper synchronous.
  • Adds regression coverage for dirty/clean transitions, ahead/behind values, and unavailable status.
File Description
app/​test/​unit/​stores/​app-store-indicators-test.ts Tests indicator synchronization through section changes and unavailable-status handling.
app/​src/​lib/​stores/​app-store.ts Centralizes indicator updates in status loading and publishes cleared indicators.

Review effort: Balanced

@tidy-dev
tidy-dev merged commit 952326e into development Oct 30, 2026
32 checks passed
@tidy-dev
tidy-dev deleted the tidy-dev-fix-issue-22997 branch October 30, 2026 16:57

@jackmhynes jackmhynes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show explicit material

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blue Indicator Isn't Always Correct

4 participants