Skip to content

Desktop: one Local changes list for the whole working folder (#416) - #452

Merged
Sebagrei merged 3 commits into
mainfrom
feature/416-desktop-local-changes-view
Nov 22, 2026
Merged

Sebagrei merged 3 commits into
mainfrom
feature/416-desktop-local-changes-view

Conversation

@Sebagrei

Copy link
Copy Markdown
Collaborator

Closes #416

What changed

One Local changes list for the whole working folder in the desktop worklist, next to New on this computer.

  • It lists every file that is modified, outdated, in conflict, new (a companion such as a STEP export) or missing, across all project groups and grouped by item. A file changed after its read-only flag was cleared, without a check-out, is listed and marked not checked out. Outdated files are listed without opening their item.
  • Actions per row and for the ticked rows: Check out (keep my file, workspace_checkout), Get latest (workspace_download, local changes kept), Check in selected (the sendLocalChanges flow of Check in all; a revision with a conflict stays checked out), Merge… (Workspace tab), Folder. A click on a revision opens its Workspace tab.
  • The count joins the worklist badge on the rail.
  • desktop/src/localchanges.rs (new), command local_changes_scan:
    • A local pass over .teamcraft/state.json with no network. It uses the entry limit of New on this computer, never reads unchanged files and hashes at most 512 MiB per scan.
    • Then the Workspace status (workspace::status) of at most 100 revisions, one after the other: local changes first, then own check-outs. The first failing call stops this pass.
    • The pure classify() / server_order() have unit tests: a file modified without a check-out, a conflict, outdated, missing, the file cap, an error row, and the local pass against a temp dir.
    • Unlike workspace_status, no SolidCraft bridge state is written per revision.
  • desktop/ui/js/local-changes.js (new, pure, no imports) is the planner. scripts/desktop-local-changes.test.mjs tests it and runs in the ui job of desktop.yml. It is also added to the scripts/ci-changes.sh self-test.
  • shell.js: scanLocalChanges(force) runs at most every 15 s and one scan at a time. It runs when the worklist opens and on window focus. refreshWorklistCount() rescans after a check-out, check-in or Get.
  • No server change.

Docs: CHANGELOG (Unreleased), README Features (desktop app), docs/src/guide/desktop.md, desktop/README.md, docs/OPEN_WORK.md (#416 ticked in the #408 line).

How it was tested

Not compiled or run on this machine: there are no local builds on this device, and Node.js is not installed here. CI verifies.

  • Locally: cargo fmt in desktop/ and scripts/ci-changes.sh --self-test, which passes.
  • CI runs: cargo test/clippy of the desktop crate (the new Rust unit tests), node scripts/check-desktop-modules.mjs and node scripts/desktop-local-changes.test.mjs.

Checklist

  • This is my own work (or my AI agent's, written from its own
    knowledge), or openly licensed material under a compatible licence
    that is credited. It contains no code decompiled, disassembled or
    rewritten from proprietary software
    and no leaked code
    (CONTRIBUTING.md).
  • Reading a file format: not applicable (no format reader changed).
  • The documentation is updated in this pull request (CHANGELOG.md,
    README.md, docs/src/**, docs/OPEN_WORK.md where it applies).
  • cargo fmt --all --check, cargo clippy --all-targets -- -D warnings
    and cargo test pass locally, or CI runs them. (fmt done locally; CI runs clippy and the tests)

🤖 Generated with Claude Code

fork and others added 2 commits November 22, 2026 20:15
A worklist section next to "New on this computer" lists every file of the
working folder that is modified, outdated, in conflict, new or missing,
grouped by item - also a file changed without a check-out - with Check out
(keep my file), Get latest, Check in selected, Merge and Folder per row and
for the ticked rows. The count joins the worklist badge on the rail.

desktop/src/localchanges.rs: a local pass over state.json (no network,
bounded by the limits of New on this computer and a hash budget), then the
Workspace status of at most 100 revisions (local changes first, then own
check-outs); pure classify() with unit tests. Command local_changes_scan.
desktop/ui/js/local-changes.js: the pure planner, tested by
scripts/desktop-local-changes.test.mjs (CI job ui).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the scan compares without side effects (workspace::status_with(.., false):
  no read-only flags, renames or state.json writes)
- the server pass rotates a window over the revisions without local changes
  or own check-outs, so outdated files anywhere are found over a few scans;
  more than 100 revisions no longer marks the scan as truncated
- files the local pass cannot check (hash budget, no base hash) are unknown:
  compared first, never listed as modified or offered a check-out on a guess
- a check-in from the list takes every changed file of the revision along
  (revisionCheckin); the dialog names the unticked ones and offers Park
- refreshWorklistCount keeps the 15 s throttle; Get, check-out, check-in,
  park and cancelled check-out rescan at once, folded into one pending scan
- revision label is a keyboard-reachable button, decorative icon hidden
- docs: desktop/README.md row moved into the feature table (and the stray
  #342 fragment back into its row), CHANGELOG, desktop guide, CLAUDE.md map

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sebagrei
Sebagrei marked this pull request as ready for review November 22, 2026 20:51
…ocal-changes-view

# Conflicts:
#	.github/workflows/desktop.yml
#	CHANGELOG.md
#	CLAUDE.md
#	README.md
#	desktop/ui/js/navigator.js
#	desktop/ui/js/shell.js
#	desktop/ui/js/workspace.js
#	docs/OPEN_WORK.md
@Sebagrei
Sebagrei merged commit bbe6e7d into main Nov 22, 2026
1 of 5 checks passed
@Sebagrei
Sebagrei deleted the feature/416-desktop-local-changes-view branch November 22, 2026 20:57
WARR-eV pushed a commit that referenced this pull request Nov 22, 2026
#457)

The `changes` job of CI, Desktop app, CodeQL and Docs fails on main
(first on ae55d1b; the CI runs of the last 14 commits were still
queued): the self-test of `scripts/ci-changes.sh` added with #416 (#452)
expects `desktop/ui/js/local-changes.js` to skip the desktop Rust jobs,
but since #448 the table runs them for every `desktop/ui/js` script (the
`graph.js` line was updated then). The new line now expects
`desktop_rust=true`. CHANGELOG entry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

UX B2: One "Local changes" view for the whole working folder

1 participant