Skip to content

feat(threads): show local git changes and pull from origin - #900

Merged
nixuuu merged 2 commits into
devfrom
feat/show-git-changes-pull-origin
Nov 16, 2026
Merged

nixuuu merged 2 commits into
devfrom
feat/show-git-changes-pull-origin

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Change

Thread details now shows uncommitted file counts and added/deleted lines beneath the branch. A compact Git action group contains Pull; its target and unavailable reasons appear in tooltips so the summary stays small.

Visible summaries refresh on opening, HEAD/turn transitions and manual refresh, without polling. Unrelated conversation snapshots do not trigger reads. Bursts coalesce in the renderer, and all threads, aliases and subdirectories of one checkout share a single worker scan. Scans use bounded file/content limits, deadlines and the existing four-process Git limit.

Pull fetches the exact origin tracking branch (or the current branch name) into an isolated temporary ref and permits only a fast-forward. Owner/home routing and checkout admission block unsafe or active checkouts; successful pulls notify affected threads before the next agent turn. Contracts are additive and older workers/homes show an update hint.

Verification

  • 28 integration tests passed, including 21 concurrent status requests sharing one scan, owner scoping, linked-home capability gates, staged reversals, ignored-file protection and concurrent fetch isolation. Temporary-file cleanup passed.
  • Contract generation and worker, gateway, integration and web typechecks passed. Focused lint/format and diff checks passed.
  • Inspected the real Svelte components in a browser with fixture data: light/dark, desktop and 375 px phone width, clean/dirty states and long branch names. Checked the disabled Pull action and its request on a clean fixture.
  • All 3 production linked-computer compatibility tests passed after preserving the legacy 32-entry capability prefix; the new Git capability travels in the additive overflow field.
  • After integration with dev, 43 tests passed across the Git status/branch, workspace branch and linked external-worktree suites. Two additional checkout-identity/removal regressions were added and the expanded status suite passed 14/14. Worker, gateway, integration and web typechecks plus focused lint/format passed.
  • Full repository verification and builds remain with CI.

Copy audit

All ten items in docs/copy.md §8 reviewed. Long inline disabled reasons → tooltip details; “Pull from origin” row → “Pull” button with the full accessible label; long errors → “Pull failed” / “Refresh failed” with actionable details. Counts use locale formatting and correct plurals; labels explain meaning independently of color. No humorous copy. Short, typical and long names checked on desktop and phone width. Tooltip-only explanations follow the requested compact summary layout and remain available through keyboard focus or touch long press.

@nixuuu
nixuuu enabled auto-merge (squash) November 16, 2026 23:35
@nixuuu
nixuuu merged commit 40f04d5 into dev Nov 16, 2026
15 checks passed
@nixuuu
nixuuu deleted the feat/show-git-changes-pull-origin branch November 16, 2026 23:53
nixuuu added a commit that referenced this pull request Nov 17, 2026
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/<branch>” 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.
nixuuu added a commit that referenced this pull request Nov 18, 2026
…gs (#986)

## Nightly.75 console report

- Reproduced the `actorAvatars` exception and `derived_inert` warnings
by invalidating avatar reads just before a PR snapshot reset. Scheduled
refreshes now use a mounted subscriber, and a later explicit read uses
its own fetch function.
- Preserve the saved timeline anchor through a slow initial snapshot.
Start the positioning deadline once data arrives and compare watch
liveness against loaded history. Routine history paging still
contributes to the diagnostics counter. Actionable recovery warnings
keep their reason.
- Open a cold thread through the owner-scoped GetThread RPC while the
overview stream is rebuilding. Skip Git scans for unavailable
placements. Report busy, missing, oversized and timed-out checkouts in
the panel, retain the last successful counts on a transient scan
failure, and cancel an abandoned shared HTTP request when its last
reader leaves.
- Skip idle web, desktop and BFF diagnostics submissions. Reserve
admission and checkpoint space for active sessions within the existing 6
MiB budget. A frozen minute carries its checkpoints even if RPC load
exhausted the space for its metric series.

The screenshots omit response bodies and the expanded recovery objects.
The tests cover concrete paths to the reported statuses. Genuine
connectivity and rate limits still surface.

## Local verification

- Focused shared-query, overview invalidation, BFF state and reads, Git
status, thread history/watch, client diagnostics and persistence tests.
Gateway, domain and web typechecks passed. Lint and formatting checked
on edited files. Full gate runs in CI.
- Chromium at 1280 and 390 px, light and dark. PR reset and avatar
reload produced no exception or Svelte warning after the fix. In a
1000-turn thread, a 2.25 s initial snapshot delay restored an 8 px
scroll offset. A real checkout reported its changed file, and a removed
worktree issued no Git request. Desktop rapid navigation cancelled the
in-flight request. At phone width in both themes, closing thread details
and navigating to the removed worktree started one Git read, cancelled
it once and issued no further Git request.

## Copy audit

Reviewed all ten items in docs/copy.md §8. Generic Git refresh failures
now identify the missing directory, busy checkout, size limit or timeout
and give a recovery action. Directory terminology matches the glossary.
Short, typical and long names were checked at desktop and phone widths.
All items pass or are inapplicable.

Fixes: #456
Fixes: #569
Fixes: #672
Fixes: #799
Fixes: #847
Fixes: #900
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