Repository navigation
Creating an xlink checks it in and shows its files at once - #157
Merged
Merged
Conversation
…re pending as cm set to shelve them does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er pending changes put aside only when cm refuses for them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h step stopped once it exists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows the xlinked files at once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…files, not as files a branch deleted or moved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e that fails before they can be shelved says what cm update said Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s changes were put back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat checks in nothing says so in plain words Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…new xlink whose files didn't load says how to load them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd why it shows no progress bar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and cm failing before they are shelved says what cm update said Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd Load its files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ges put aside for several reasons as just put aside Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…older holding it is updated instead of its own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
violetaGitHub
marked this pull request as ready for review
October 29, 2026 10:19
violetaGitHub
enabled auto-merge
October 29, 2026 10:19
…es, whatever views are added Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this pull request do?
Creating an xlink now checks it in and loads its files, so its folder shows the other repository's files at once.
Current behavior
New xlink… created a pending xlink whose folder stayed empty. To see its files the user had to check it in, then update, and a workspace update finds the workspace up to date and loads nothing, so in practice the files didn't come until someone else checked in.
Behavior with this pull request
cm xlinkfails, the dialog still closes (the xlink exists) and the toast says what it is now and what to do: not checked in (it's in Changes), or checked in without its files (with a Load its files action).How it was implemented
cmcommand loads a pending xlink:cmfills its folder only from the server's tree. A rootcm updateafter the checkin says "up to date" (it goes the switch-to-last way);cm update <xlink folder>loads it.XlinksApi.create(an operation now) runscm xlink(query), thencm checkin <xlink> --all --dependencies -commentsfile(checkinArgs,execute), thenloadXlink(main/workspace/loadXlink.ts):cm update <xlink> --machinereadable --noinput --dontmerge(loadXlinkArgs,execute). Three commands when nothing gets in the way.cmchecks the whole workspace for pending changes and does what client.conf'sPendingChangesOnSwitchActionsays: unset (the default), it updates and leaves them; set to Shelve, it would shelve/undo/merge them itself, which--machinereadableturns into a refusal. On a refusalloadXlinkfollowsswitchApproach: undo unchanged checkouts; leave a merge alone; or put the changes aside as a switch does (automatic shelve recorded with the newShelvedChangesReason'xlink', undo,moveNewItemsAside, load,putShelvedChangesBack).cmfailing before the shelve gives back whatcm updatesaid; the app's own "Check them in first" errors stay.CreatedXlink(loaded/notCheckedIn/notLoaded) resolves instead of throwing oncecm xlinksucceeded;createdXlinkMessageandloadedXlinkMessageword the endings;unloadedXlinkOfdecides when Files offers Load its files;XlinksApi.load/loadXlinkFilesrun it.changesPutBackErroris shared withshelveBlockedAndUpdate.cmshelve on its own (the app never does, as with switch); writing to client.conf (the app never writescm's config).Behavior changes
--forcedetailedprogressis turned off by--machinereadable(documented).cmset to shelve pending changes, its first refusedcm updateshows in red in the status bar, as other recoveries inside the main process already do.Checklist
npm run typecheckandnpm testpass (7,839). New tests cover:loadXlinkoverplayAlongWorkspace(updates the folder alone; refusal → shelve/undo/load/merge back; reads pending changes once; changes that don't come back are left changes with reason'xlink'; unchanged checkouts; merge in progress; failures before and after the shelve); the service's commands andCreatedXlinkmapping (xlinksService.test.ts); the dialog's comment and words; the endings; the menu decision; "Welcome back" and Shelves wording.scripts/sandboxes/xlinks.sh,cmset to Shelve, README.md pending): created and checked in as changeset 3 with its files; Load its files on an xlink checked in bycm; both themes, a narrow window, a clean console; command log counted.npm run e2e: not run; smoke creates no xlinks and the change touches no startup or navigation.playAlongWorkspacelearnedcm update.XlinksApi.load, menu entry, toast action); the "Welcome back" reason;cmnamed in copy; shelve errors hidden; claims about server failures; tests for the mapping and the single status read; record mode; refresh list; doc wrap. Declined: one shared "shelve aside" skeleton for switch, update and xlink (they shelve different changes, write different records and steps; only the put-back error was shared); a progress bar (see above); markingcm's expected refusal as handled from the main process (no such channel exists today). Noted: commitcacd0798changesXlinksApi.createbefore3ade145aupdates its caller, so it doesn't typecheck alone;161b651b's message carries two changes; some docs landed in their own commits.docs/features/xlinks.mddescribes creating, loading and thecmcommands;docs/features/shelves-and-switching.mdnames the new flow.Fixed issues
None.
🤖 Generated with Claude Code