Skip to content

feat(app): switch project avatars between letters and generated from Knobs - #57930

Merged
kitlangton merged 1 commit into
betafrom
avatar-experiment
Oct 21, 2026
Merged

kitlangton merged 1 commit into
betafrom
avatar-experiment

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Projects without an icon show the letter monograms again by default. James's generated avatars from #57871 stay fully intact and are one switch away under Knobs → Experiments → Project avatars (Letters / Generated).

  • One choice drives every ProjectAvatar: sidebar, Home, the new-session picker, the session header, and tab avatars.
  • Detected (feat(core): show detected project icons #57655) and custom icons, and chosen colors, still win over both modes.
  • The hover animation lives on the generated canvas, so it only runs in Generated.
  • The setting is read synchronously from the Knobs store at module load, so there is no flash on startup.
  • Changing it live swaps avatars inside a view transition, so they crossfade (instant where view transitions are unsupported).

Letters mode is the exact pre-#57871 path (first(fallback) on the gradient surface). With Letters as the default, the two e2e assertions #57871 adjusted for the generated canvas (tabs.spec.ts, mobile-session.spec.ts) go back to their earlier form; project-avatar-hover.test.ts opts into Generated through the Knobs API and keeps passing.

Verification: bun typecheck (ui, app), project-avatar + motion-tuning unit tests, project-avatar-hover browser test, bun run lint:changed origin/beta. No sidebar still is attached: the one browser proof run didn't get the fixture sidebar to list several projects, and I didn't retry it.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound. I rendered ProjectAvatar in happy-dom: it shows letters by default, and flipping projectAvatar.style to Generated and back swaps between the letter and the canvas live. The setting is saved, and the saved key is cleared when it goes back to the default. Project-avatar, motion-tuning and avatar-hover tests pass, and ui and app typecheck cleanly. The knob follows the same choice + signal + subscribe pattern as sidebar.hover, and the e2e edits restore exactly what #57871 changed. I didn't run the e2e specs or try the crossfade, since happy-dom has no view transitions.

Public API: unchanged. The new knob is only stored on the device, under the existing opencode.motion.v2 key.

I couldn't capture the web app, so a before/after screenshot or a short clip of the sidebar switching between Letters and Generated would be useful.

@kitlangton
kitlangton merged commit 0fccb33 into beta Oct 21, 2026
10 of 18 checks passed
@kitlangton
kitlangton deleted the avatar-experiment branch October 21, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant