Repository navigation
cli(feat): share each profile's colour and symbol through the CLI - #100
Merged
Merged
Conversation
Rebuild the menu-bar popover around profiles, following the canvas redesign. - Each profile leads a group and its workspaces sit beneath it, pinned first and then by last launch; this replaces the profile filter. Workspaces whose profile is missing follow the groups and name it. - The header is search and the gear. Typing selects the first match so Return's target is visible, and the footer names what Return and Command-Return open. - Clicking a row opens it. Command-Return and Command-click open the other destination; the gear menu's "Return opens in" replaces the ChatGPT/Terminal control and keeps the saved preference. - Rows drop their Open buttons. The actions button shows with the hover or selection plate and stays visible on rows that need repair, which also offer Locate…. Right-click shows the same actions. - Each profile shows its tightest Codex window as a figure and a ring. Low and critical use darker orange and red in light mode so the figure keeps 4.5:1 contrast; the profile's actions list every window with its reset time. - The popover is 360 points wide; previews render at 2x on any display. Tests cover nesting and alignment, search selection, Command-Return, the Return destination, right-click actions, the usage lines and quota colours in both appearances. DESIGN.md, the READMEs, the site copy, llms.txt and the previews are updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The footer decided whether to show the Return and Command-Return hints by comparing the status message with two literals that the store also set. Rewording either side would have left the footer stuck on a stale message without any error. The store now keeps its resting prompts in one place and exposes hasStatusNews, which the footer uses. A store test covers the resting prompt and a reported outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build the rest of the canvas redesign on top of the grouped menu. - Each profile has a colour and symbol. New profiles get a stable colour from an FNV-1a hash of their name, with default in graphite, and show their initial. The palette leaves out red, orange and yellow, which mean low quota; white symbols keep 4.5:1 contrast. - Appearance… in a profile's actions replaces the list with an editor: a preview with the profile's CODEX_HOME path, eight colour swatches and twelve symbols. Choices apply at once and persist in UserDefaults; Reset restores the automatic look, and Done, Return or Escape returns. The chosen swatch gains a ring and every choice reports its state to accessibility clients. - A search result listed without its profile row shows a square of the profile's colour beside its name. - Quota in menu bar, an opt-in gear-menu toggle, shows the lowest remaining share across profiles beside the template icon. The tooltip and VoiceOver label name that window. While it is on, usage is read every five minutes through the same path as alerts, with no notification permission; background reads stop only when both are off. Tests cover automatic and chosen appearance, the editor and its persistence, the tag colour, the lowest figure and its tooltip, and background reads that follow the figure. The previews, a new editor preview, DESIGN.md, the READMEs, the site alt text and llms.txt are updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions The profile's actions listed each window with its reset time, except a window whose reset had already passed, which said only "awaiting a fresh reading". It now reads "5h: reset at 14:20 · awaiting a fresh reading", worded in the past like the tooltip. An interaction test covers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to claude/menu-profile-identity
- Darken green and graphite slightly so white symbols keep the 4.5:1 contrast the code and docs claim (green was 4.40:1, graphite 4.52:1; now 4.67:1 and 4.72:1). A unit test computes the contrast of every colour so the claim stays true. - A symbol choice whose SF Symbol is missing on this Mac shows the profile's initial instead of a blank button. - Background passes list profiles each time, so profiles created or removed outside the app join or leave the figure and alerts while the menu stays closed. They refresh quietly and leave the footer's status message alone; a foreground refresh that joins one still reports. The usage fixture answers profile listings from files without counting them as usage reads, and a test covers a profile joining. Previews are re-rendered with the adjusted colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give a profile one identity that every tool shows. - `codex-profile appearance [profile] [--color] [--symbol] [--reset] [--json]` shows or sets a profile's colour and symbol. Without a choice, default is graphite and other profiles take a stable colour from an FNV-1a hash of their name, computed the same way as the menu-bar app. Colours leave out red, orange and yellow, which mean low quota. Choices live in a private appearance.tsv beside the workspace registry, written atomically under the state lock with symlinks refused; damaged lines fall back to automatic, and `remove` forgets the profile's entry. Help, usage, completions and USAGE.md cover it. - The menu-bar app reads appearances with each refresh and writes choices through the CLI instead of UserDefaults. A choice shows at once, writes run in order, a refresh never overwrites a write in flight, and a refused write shows the CLI's reason and reloads. - `env` exports CODEX_PROFILE_COLOR, and `shell-init --prompt` puts a dot in the profile's colour before `[codex:<profile>]` in bash, zsh and fish. The dot uses fixed escapes, so earlier dots are removed exactly and never stack; NO_COLOR leaves it out. - Raycast's Open Profile tints each profile's icon with its colour. - `launcher create` defaults to the profile's colour; launcher colours gain indigo and brown. Tests cover the command, its storage and refusals, env, remove, the launcher default, completions, the prompt dot in three shells, the app reading and writing through the real CLI with matching automatic colours, and Raycast's colours matching the CLI and the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bring in the site redesign (#97). Its menu bar section replaced the one this branch had edited, so the new section stays as #97 wrote it, with its screenshot refreshed to this branch's dark preview (same layout, so the numbered pins still line up) and its description noting each profile's colour. Also clarify in DESIGN.md and the macOS guide that background passes list profiles quietly only after the first profile load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ksss/codex-profiles into claude/profile-identity-cli
…to claude/profile-identity-cli
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.
Summary
One colour and symbol per profile, shown everywhere: the menu-bar app, the shell prompt, Raycast and new launchers. Stacked on #96, which added colours to the menu-bar app; GitHub retargets this to
mainonce #96 merges.codex-profile appearancecommand.codex-profile appearance # every profile codex-profile appearance work --color teal --symbol briefcase codex-profile appearance work --reset codex-profile appearance --jsondefaultis graphite and other profiles take a stable colour from an FNV-1a hash of their name, computed the same way as the app.appearance.tsvnext to the workspace registry, written atomically under the state lock with symlinks refused. Damaged lines fall back to automatic, andremoveforgets the profile's entry.usage(), per-command help,USAGE.md,llms.txtand the bash, zsh and fish completions all cover the new command.envexportsCODEX_PROFILE_COLOR, andshell-init --promptputs a●in the profile's colour before[codex:<profile>]in bash, zsh and fish. The dot uses fixed escapes, so earlier dots are removed exactly and never stack, including through venv-style prompt restores.NO_COLORleaves it out, and the prompt never runs the CLI.appearancekeeps plain icons.launcher createuses the profile's colour unless--coloris given. Launcher colours gainindigoandbrown, andredandorangeare still accepted.Not in this PR: symbols in Raycast, since its built-in icons don't map cleanly to the twelve symbols. Colour-coded Terminal tabs are also left out;
CODEX_PROFILE_TERMINAL_TITLEalready labels titles.Testing
make checkpasses, including ShellCheck.test/cli/appearance-test.shcovers:envin POSIX and fish;remove.launcher-test.shcovers the default colour following the profile, and an explicit--colorstill winning.prompt-test.shruns the existing transcripts withNO_COLORand adds dot checks in bash, zsh and fish: colour, no stacking, switching profile.completions-test.shcovers the new flags and values in all three shells.npm testpasses (58 tests). It includes checks that Raycast's colours match the CLI's names and the app's exact values.npm run typecheck,npx eslintandnpx prettier --check, which neednpm ciinraycast/. The new code reuses the existing{ source, tintColor }image shape andObject.hasOwn(ES2022).Scope and compatibility
appearancecommand,envoutput, the opt-in prompt and launcher defaults, plus the menu-bar app and Raycast.cli/loginbehaviour,app defaultand named Desktop launches are unchanged.envnow prints a third line,CODEX_PROFILE_COLOR.launcher createwithout--colornow uses the profile colour instead of always blue.NO_COLORis set.appearance.tsvis an optional, additive file.Checklist
make check; if the environment lacks ShellCheck, I ranmake testand documented the missing lint result instead.or migrates auth tokens or ChatGPT cookies.
app defaultsession and use theoriginal signed app bundle.
🤖 Generated with Claude Code