Skip to content

fix(install): say what was ignored, and which profile is the live one - #28

Merged
adamXbot merged 1 commit into
mainfrom
fix/install-prompts-say-what-they-did
Sep 1, 2026
Merged

adamXbot merged 1 commit into
mainfrom
fix/install-prompts-say-what-they-did

Conversation

@adamXbot

@adamXbot adamXbot commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Three things went wrong in a single fxcss install, and all three are the prompt failing to say something it already knew.

Stacked on #27. GitHub shows that PR's commit here too, because
this branch was cut from it. Review the last commit only, or merge #27
first and this reduces to a single commit.

A dropped token was dropped silently

Someone typed 20, 4 at the optional-sheets menu and got sheet 4 alone:

  Include: 20, 4
  including: highlight-tab

Their terminal had leaked a Page Up escape into the line, so the first token arrived as \x1b[5~20. int() refused it and it vanished without a word. parse_selection was working as designed — under-select on a typo, never over-select, because these sheets are written into a profile someone lives in — but silence turned a right instinct into a wrong result. Ordering was never involved; "4, 20" and "20, 4" both already worked.

scan_selection now returns the rejects alongside the indices, and the menu shows each one:

  Include: ^[[5~20, 4
    ignored '\x1b[5~20' — not a number
    That is 1 of the 2 you asked for. Retype the whole list, or Enter to keep it.
  Include: 20, 4
  including: highlight-tab, theme-material-ocean

repr() is deliberate — an escape sequence is shown rather than replayed at the terminal, and seeing the \x1b is the whole diagnosis. Out-of-range numbers are reported the same way ("99, 4" used to give you 4 in silence). Enter on a retry keeps what was already read, so a partial answer never costs the whole list.

Nothing said which profile was the live one

Three profiles, the (Enter) default on dev-edition-default, and the Firefox in daily use on default-release. The kind label distinguishes the channels but not which profile is open, so the theme went into the wrong one — which looks exactly like the theme not working.

  3. default-release       [Release]   ~/Library/…/j98sx7zh.default-release
     → open in Firefox now, has its own chrome/

Whether Firefox holds the profile's lock right now is the fact that settles it, and install.firefox_running already computed it — it checks the lock is held, not merely present, so it stays honest after a crash. Whether the profile already has a chrome/ or an fxcss theme is the other half. Paths shorten to ~ so the tail is readable.

The confirmation did not stand out

The chosen profile and the sheets being written are now bold, so what is about to be installed reads as the answer rather than as more prose. Colour is off when stdout is not a tty and honours NO_COLOR — these are prompts, not report output with a --no-colour flag of their own.

Compatibility

parse_selection keeps its old signature and its existing tests: callers with nothing to say about rejects still get a plain list. 274 unit tests, including the escape-sequence case as a direct regression.

🤖 Generated with Claude Code

Three things went wrong in one install, all of them the prompt failing to
say what it knew.

**A dropped token was dropped silently.** Someone typed "20, 4" and got
sheet 4 alone. Their terminal had leaked a Page Up escape into the line, so
the first token arrived as "\x1b[5~20"; int() refused it and it vanished
without a word. parse_selection was working as designed -- under-select on a
typo, never over-select, because these sheets get written into a profile
someone lives in -- but the silence turned a right instinct into a wrong
result. scan_selection now returns the rejects alongside the indices, and
the menu prints each one with repr(), so an escape sequence is shown rather
than replayed at the terminal. Anything ignored re-asks, with Enter keeping
what was already read so a partial answer never costs the whole list.

**Nothing said which profile was the live one.** Three profiles, the (Enter)
default on dev-edition-default, and the Firefox in daily use on
default-release. The kind label distinguishes them, but not which one is
actually open, so the theme went into the wrong profile -- which looks
exactly like the theme not working. Each line now carries what settles it:
whether Firefox holds the profile's lock right now, and whether it already
has a chrome/ or an fxcss theme. Paths shorten to ~ so the tail is readable.

**The confirmation did not stand out.** The chosen profile and the sheets
being written are now bold, so what is about to be installed reads as the
answer rather than as more prose. Colour is off when stdout is not a tty and
honours NO_COLOR, since these are prompts rather than report output with a
--no-colour flag of their own.

parse_selection keeps its old signature and its old tests: callers with
nothing to say about rejects still get a plain list.

Co-Authored-By: Claude Fable 5 <[email protected]>
@adamXbot
adamXbot force-pushed the fix/install-prompts-say-what-they-did branch from 6287341 to 6ddbc95 Compare September 1, 2026 06:23
@adamXbot
adamXbot merged commit 594669c into main Sep 1, 2026
5 checks passed
@adamXbot
adamXbot deleted the fix/install-prompts-say-what-they-did branch September 1, 2026 06:36
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