Repository navigation
Offer a Linux desktop at install: the installer says how, and codevisor setup asks (851-4495) - #1499
Merged
pondorasti merged 1 commit intoNov 27, 2026
Conversation
…or setup asks (851-4495) The installer ends on Linux with the command that adds a desktop, unless one is already set up or onboarding just asked. codevisor setup asks once the machine is signed in, default No, and runs the same desktop setup on yes; a no or a failure is one line and never fails onboarding. Co-Authored-By: Claude Fable 5.2 <[email protected]>
pondorasti
force-pushed
the
alexandru/851-4495-linux-desktop-step-6-offer-the-desktop-at
branch
from
November 27, 2026 01:54
8937559 to
d7c9d76
Compare
pondorasti
deleted the
alexandru/851-4495-linux-desktop-step-6-offer-the-desktop-at
branch
November 27, 2026 01:56
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.
Fixes 851-4495. Part of 851-4479 (Linux desktops), step 6 of the design, command-line parts. No app UI.
What changes
==> Add a desktop: codevisor desktop setup, worded the way the server's account has to run it (su - codevisor -c '…'after a root install). Not on macOS. Not when a desktop that setup made is there (screen-sharing.jsonwith"service": "systemd-user"or"process"in the data folder).codevisor setupasks "Set up a desktop?" on Linux once the machine is signed in, default No, and on yes calls the same function ascodevisor desktop setup(cli/desktop-offer.tscallsdesktopSetupCommand; there is no second implementation).codevisor setupstops as before, so the question is never reached.codevisor desktop setup, and onboarding carries on and exits 0. Ctrl-C at the question prints nothing more. Anything that throws inside the offer is caught the same way.Things I added to the scope as written
codevisor desktopis stable. So the installer asks the installedcodevisorfordesktop setup --helpand stays quiet when that isn't there. This is one more CLI call at the end of every Linux install.desktop-declinedin the data folder). Without it, every latercodevisor setup, including a reinstall at a terminal, would ask again. A yes whose setup failed is asked again next time, and so is a question that was cancelled.After your review at 8937559
desktop-declined. A cancel writes nothing, prints nothing more, and the question comes back on the next run.desktop-declinedis in the data folder (a No, now or earlier), and when thecodevisor setupthis install ran at a terminal asked, got a yes, and the setup failed. For the second, setup writesdesktop-setup-failedand the installer clears that file before it runs onboarding, so only a failure from this run counts. The line stays for installs without a terminal and wherever onboarding didn't ask.codevisor desktop setupstill prints the commands for an administrator.install.sh:as_service_user)codevisor desktop setup --help </dev/nullon that CLIThe old CLI does nothing but print and exit, so the probe is unchanged.
Tests
cli/desktop-offer.test.ts: asked and declined, yes runs the same setup, failure and a throwing setup, a cancelled question, every quiet case (no sudo among them), the remembered No, a config Codevisor didn't write.cli/setup.test.ts: offered after sign-in and before "Setup complete", on an already signed-in machine, not after a failed sign-in, and a breaking offer doesn't fail setup.scripts/release/install-desktop.test.mjs: the line on a fresh install, the root wording, no line with a Codevisor desktop, after a No, with an older release, or on a Mac; still a line with a config setup didn't write, and after an earlier failed setup when this install has no terminal. The existing installer test file was at the 500-line limit, so its harness moved toinstall-test-support.mjsunchanged, and five of its expectations gained the new CLI call.deploy-www.ymlruns the new test file too.Proof in a container (Debian 12, the real
install.sh)The installer ran for real against a stand-in server archive whose
codevisoris this branch's build. No cloud account was used: a small local pass-through answered the "is this machine signed in" question with yes and passed everything else to the real server.==> Add a desktop: su - codevisor -c 'codevisor desktop setup'codevisor setupwithout a terminalcodevisor setup, answered Nocodevisor setupagaincodevisor setup, answered Yescodevisorcodevisor setupwith the desktop therecodevisor setup, Ctrl-C at the questiondesktop-declinedwritten==> Add a desktop: su - codevisor -c 'codevisor desktop setup'codevisor setupdoesn't ask, exit 0;codevisor desktop setupprints the commands for an administrator, exit 1Code review
Two passes (medium) on the branch before the first push. No pass of mine after your review, as asked.
Fixed: the installer hid its line whenever onboarding had run, also when onboarding never asked; a throw in the offer could fail a finished sign-in;
codevisor setupbuilt the desktop's system object up front on every platform; my installer tests were a second harness outside the check that gates the website deploy; the "asked" mark was written before setup ran, so a failed yes was never asked again; a mark that can't be written could swallow a yes; the installer matched the wordserviceanywhere in the config.Left, with the reason:
Not in this PR
🤖 Generated with Claude Code