Skip to content

fix: preserve step expansion state per phase - #4

Merged
malhashemi merged 2 commits into
mainfrom
t3code/phase-step-collapse-restore
Sep 15, 2026
Merged

malhashemi merged 2 commits into
mainfrom
t3code/phase-step-collapse-restore

Conversation

@malhashemi

@malhashemi malhashemi commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Opening a phase previously expanded its first step whenever no step was selected, including after the user deliberately collapsed every step. Steps now start collapsed, and each phase remembers its own expanded step or all-collapsed state when reopened or when switching phases.

Cost-by-agent links still open the selected agent directly. The step arrow now reports its current expanded state and labels its action as Expand or Collapse.

Release

Prepare patch release 0.9.7 with bun run release:prepare patch, following docs/releasing.md. The lockfile is already current, and the release-status script confirms this version is unpublished. After merge to main and successful checks, CI will publish the tested npm archive and create the matching GitHub tag and release.

Validation

  • bun run check passed (types, lint, and formatting).
  • bun test passed: 128 tests, 0 failures.
  • bun run test:package passed, including the production build and isolated packaged CLI startup, version, browser assets, URL, and restart checks.
  • 17 browser checks passed against the synthetic demo, covering initial state, collapse/reopen, per-phase memory, one open step per phase, both step controls, empty phases, and cost-table navigation.

Note

Preserve per-phase step expansion state in run detail view

Replaces the single shared selected-agent state in main.tsx with a phase-keyed map of expanded agents. Each phase now remembers its own expanded agent, so switching phases no longer resets to the first agent. Selecting an agent from the table switches to its phase and marks that agent as expanded. The agent icon button exposes expanded/collapsed state and labels to assistive technology.

Macroscope summarized de9ad28.

@malhashemi
malhashemi merged commit 03cc0fd into main Sep 15, 2026
5 checks passed
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