Skip to content

fix(onboarding): derive agent lists from AGENT_ORDER to prevent sync drift#44

Merged
RealZST merged 1 commit intomainfrom
fix/onboarding-agent-list-derive
May 8, 2026
Merged

fix(onboarding): derive agent lists from AGENT_ORDER to prevent sync drift#44
RealZST merged 1 commit intomainfrom
fix/onboarding-agent-list-derive

Conversation

@RealZST
Copy link
Copy Markdown
Owner

@RealZST RealZST commented May 8, 2026

Summary

  • Fix missing OpenCode mascot/label on the "Install to Agent" mock card in the marketplace preview step (regression from PR feat: add OpenCode as a supported agent #36, which updated 2 of 3 hardcoded agent lists in this file).
  • Derive all three agent enumerations from AGENT_ORDER + agentDisplayName() so future agent additions can't silently drift again.
  • Re-key FLOAT_DELAYS / SCATTER_POSITIONS as Record<(typeof AGENT_ORDER)[number], ...> — adding a 9th agent now produces a hard tsc error (TS2741: Property '<name>' is missing) instead of a runtime undefined on the scatter animation.

Test plan

  • npx tsc --noEmit clean
  • npm run lint clean
  • Verified the onboarding UI renders correctly (welcome scatter, agent files preview sidebar, marketplace "Install to Agent" card now shows OpenCode)
  • Confirmed compile-time guard: deleting any key from FLOAT_DELAYS yields TS2741

🤖 Generated with Claude Code

…drift

The "Install to Agent" mock card on the marketplace preview step was missing
OpenCode because PR #36 didn't update an inline hardcoded agent list. Three
agent enumerations in this file were duplicated from AGENT_ORDER, so any
future agent addition could silently drift again.

- Drop the local AGENTS const and inline {id,label} lists; derive all three
  sites from AGENT_ORDER + agentDisplayName().
- Re-key FLOAT_DELAYS and SCATTER_POSITIONS as Record<(typeof AGENT_ORDER)[number], ...>
  so adding an agent forces TS to flag missing entries rather than producing
  undefined at runtime.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@RealZST RealZST merged commit bbdd4eb into main May 8, 2026
3 checks passed
@RealZST RealZST deleted the fix/onboarding-agent-list-derive branch May 8, 2026 17:16
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