Skip to content

Persist changed-files expansion state per thread#37

Open
Marve10s wants to merge 3 commits intoEmanuele-web04:mainfrom
Marve10s:codex/persist-changed-files-expansion
Open

Persist changed-files expansion state per thread#37
Marve10s wants to merge 3 commits intoEmanuele-web04:mainfrom
Marve10s:codex/persist-changed-files-expansion

Conversation

@Marve10s
Copy link
Copy Markdown
Contributor

What changed

  • Persist changed-files tree expansion state per thread instead of keeping it inside MessagesTimeline component state.
  • Move the expansion source of truth into the web store, keyed by scoped thread id and turn id.
  • Clean up stored expansion overrides when threads disappear.

Why

The changed-files tree reset to expanded whenever the thread view unmounted and mounted again. That happened because the expansion map lived inside MessagesTimeline as local React state.

Notes

  • Default behavior stays the same: changed-files trees start expanded.
  • Only collapsed overrides are stored; expanding again removes the override.
  • This adapts the upstream t3code#1858 behavior to DPcode's current store structure.

Validation

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run --cwd apps/web test --run src/store.test.ts src/components/chat/MessagesTimeline.test.tsx

@github-actions github-actions Bot added size:L vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 20, 2026
@Marve10s Marve10s marked this pull request as ready for review April 20, 2026 07:16
…-files-expansion

# Conflicts:
#	apps/web/src/components/chat/ChatTranscriptPane.tsx
#	apps/web/src/components/chat/MessagesTimeline.tsx
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. and removed vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant