Skip to content

fix: batch Resume UI layer installation - #25

Merged
tt-a1i merged 2 commits into
mainfrom
codex/fix-resume-ui-lifecycle-20260820
Aug 20, 2026
Merged

fix: batch Resume UI layer installation#25
tt-a1i merged 2 commits into
mainfrom
codex/fix-resume-ui-lifecycle-20260820

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • batch the subagent, suggestion, and workflow editor layers into one post-bind setEditorComponent write per TUI session
  • rebuild the composed factory for a fresh Resume runtime instead of retaining instance-local guards or stale session closures
  • keep the task widget mounted while it is visible, render from the live task snapshot, and request a repaint for content changes

Why

Pi owns /resume: it clears extension UI, replaces the Session runtime, and emits session_start for the new runtime. The old PR #13 tried to suppress repeated installs with booleans stored inside each extension instance, but those booleans reset on Resume. Its task guard could also freeze the first snapshot.

This change works with Pi's lifecycle: editor contributors register their layers on the runtime EventBus, one coordinator batches the UI installation after all session_start handlers, and shutdown removes only layers that were actually registered.

Replaces #13.

Test plan

  • bun run check
  • bun run test — 715 Node tests and 29 Vitest tests
  • npm pack --dry-run --ignore-scripts --json — runtime coordinator included, test excluded
  • regression test creates a fresh harness for the resumed runtime and verifies one editor UI write per Session
  • task regression test verifies one mounted widget renders newly added and transitioned tasks from live state

@tt-a1i
tt-a1i merged commit 0326648 into main Aug 20, 2026
4 checks passed
@tt-a1i
tt-a1i deleted the codex/fix-resume-ui-lifecycle-20260820 branch August 20, 2026 12:47
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