fix(mac): make Start say why it failed, and copy the password without a flash - #235
Merged
Conversation
… a flash
Two problems from testing the previous change.
**Start did nothing after the database was deleted.** Removing the bootstrap
password was right, but it turned a silent recreation into a silent refusal:
with the email still present and the password gone, an empty database is the
half-configured case bootstrap.go rejects outright ("CIX_BOOTSTRAP_ADMIN_EMAIL
is set but CIX_BOOTSTRAP_ADMIN_PASSWORD is empty"). The server exited in
milliseconds and the menu went back to "Stopped" — indistinguishable from a
button that does nothing. needsFirstRun already knew, but only at launch; a
running app never asked again.
Start now checks before starting, and offers to set up again rather than
spawning a process that cannot survive. It also verifies the server outlived
the start: launchctl reports having spawned it, not having kept it, so a
process that rejects its own configuration used to disappear without a word.
When that happens the server's own message is shown, trimmed to the last few
lines with a pointer to the log.
Worth stating for the record: the refusal is guarded by `count == 0`, so
retiring the password never affects a start against an intact database.
**Copy Password flashed the window.** AppleScript's `display dialog` is modal
and returns only when it closes, so a copy button meant closing the window and
opening it again — on screen, a blink. The password is now on the clipboard
before the window appears and the message says so, which removes the flash and
the click together. There is nothing to be coy about: this is a password the
app generated seconds ago and is showing on purpose.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 10, 2026
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.
Both found by testing #234 rather than by reading it.
Start did nothing after the database was deleted
Retiring the bootstrap password was right, but it turned a silent recreation
into a silent refusal. With the email still present and the password gone, an
empty database is the half-configured case
bootstrap.gorejects outright:The server exited in milliseconds and the menu returned to "Stopped" — from the
outside, a Start button that does nothing.
needsFirstRunalready knew, but itis only consulted at launch; an app already running never asked again.
Start now checks before starting and offers to set up again. It also verifies
the server outlived the start —
launchctlanswers for having spawned theprocess, not for it surviving — and when it did not, shows the server's own
message, trimmed to the last few lines with a pointer to the log.
For the record: that refusal is guarded by
count == 0, so retiring thepassword never affects a start against an intact database.
Copy Password flashed the window
display dialogis modal and returns only when it closes, so a copy buttonmeant closing the window and opening it again — a blink.
The password is now on the clipboard before the window appears, and the
message says so. That removes the flash and the click at once, and there is
nothing to be coy about: this is a password the app generated seconds ago and
is showing on purpose, and the clipboard is where it was going anyway.
Tests
lastServerError— reports the tail, drops blank lines, stays bounded, andstill says something when there is no log at all.
🤖 Generated with Claude Code