githubnext/chopinPublic

Let's compose rich plans together

Unify expand and collapse timing #364

MergedMaggieAppletonmerged 1 commit intomainfromrefs/pull/364/head
  1. MA

    ## Why Revealing more content moved at four speeds on two curves: the sidebar 250ms, the research fold 420ms rows + 300ms opacity after a 120ms delay (about 540ms in all, the slowest motion in the app), the decision fold 200ms on `--ease-out`, and Chat tool-call details not at all (`display: none`).

    ## What changed - One preset: `--acc-expand` 250ms open, `--acc-collapse` 200ms close, `--motion-move`. `--acc-collapse` goes from 250ms to 200ms, and the `collapse` contract's `closeDuration` follows (200). - Research fold and decision fold use those tokens (open = expand, close = collapse); the 120ms delay and the bespoke 420/300ms values are gone, with their `preserved-values.json` exception. - Chat tool-call details now use `MotionDisclosure` with the `collapse` contract, so they animate like the sidebar (previously instant). - Reduced motion is unchanged: `.motion-collapse` and the folds still settle with `transition: none`. - Not done: decision "Add an option" row swap (an input/focus swap in `packages/question`, not a fold) and the broader token cleanup (finding 9). Left `closeDuration` untouched in other contracts to avoid #346.

    ## Screenshots ![Research, decision, Chat, and sidebar folds at 50, 150, and 300 milliseconds after opening](https://github.com/user-attachments/assets/2698c0f2-1042-44be-a669-5cb145883dd8)

    Timing, not layout, changed. Height/opacity frame sequences every 50ms (before: main at :8795, after: this branch at :8864). The research, decision and tool-details folds were sampled by mounting the shipped classes in the live page, because the fake server has no Planner/research; the sidebar disclosure is the real component. - Before: `frames-before.txt` (not committed), after: `frames-after.txt`. - Settle time before to after: research open 533 to 260ms, research close 416 to 202ms, decision fold 199 to 259ms open / 210ms close, tool details instant to 258ms open / 208ms close, sidebar 253/324 to 243/246ms.

    ## Testing - `bun run ci` passes; `bun run types` passes. - `bun test apps/web packages/editor packages/question`: all pass; `tokens.test.ts` timed out under machine load, passes alone with `--timeout 60000`. - Local e2e suspended per the brief; relying on PR CI.

    馃 Generated with [Claude Code](https://claude.com/claude-code)

  2. MaggieAppletonhead-ref-force-pushed ca4c9811a27clast month on GitHub

  3. MaggieAppletonauto-rebase-enabledlast month on GitHub

  4. MaggieAppletonmerged 27f40ff5a54blast month on GitHub

  5. MaggieAppletonclosedlast month on GitHub

  6. MaggieAppletonhead-ref-deletedlast month on GitHub