Skip to content

fix(threads): keep local changes stable between visits - #918

Merged
nixuuu merged 1 commit into
devfrom
feat/cache-local-changes
Nov 17, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/cache-local-changes

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 17, 2026

Copy link
Copy Markdown
Member

Returning to a thread remounted Local changes with no visible data, so the counters disappeared until Git status loaded again. Restore the thread's last result from the existing bounded query cache immediately, then refresh in the background without a spinner. A failed refresh preserves the counters and exposes its error in the tooltip; first loads and manual refreshes retain their loading indicator.

Move Pull into the Local changes header as an icon beside Refresh. Both actions keep their positions before loading and without a checkout. Pull's accessible label and tooltip identify the target branch; unavailable actions explain their restriction. Update the workspace and UI API documentation.

Fixes: #900

Validation

  • Passed web typecheck: bun run --filter @canopy/web typecheck.
  • Passed lint and formatting for the edited TypeScript/Svelte files; git diff --check is clean.
  • Checked the real component in an isolated Chromium preview with mocked Git responses: cached thread returns and details reopening, delayed/failed refreshes, manual refresh, updated results, empty and non-Git directories, Pull loading and disabled tooltips. Cached counters and action positions remain stable.
  • Inspected light/dark themes at desktop and phone widths, including short and long target branch names.
  • Full repository verification remains with GitHub CI.

Copy audit

Passed all 10 items in docs/copy.md §8. Visible “Pull” → icon with “Pull from origin/” as both accessible label and normal tooltip, preserving the action and its target without a separate row. Added “Open a Git checkout to pull changes.” for the disabled non-Git state. Existing restriction/error messages remain available in tooltips; no new terminology or duplicate visible copy. Checked short/long names and both viewport sizes.

Restore the shared Git status snapshot immediately and refresh it in the background. Keep cached counters visible on refresh failures and move Pull beside Refresh as an icon action with a target or disabled-reason tooltip.

Fixes: #900
@nixuuu
nixuuu enabled auto-merge (squash) November 17, 2026 08:36
@nixuuu
nixuuu merged commit 7f89975 into dev Nov 17, 2026
15 checks passed
@nixuuu
nixuuu deleted the feat/cache-local-changes branch November 17, 2026 08:42
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.

1 participant