Commit ed025b7
refactor(plugins): migrate claude-timeline to scope-based lifecycle
The 12-resource hand-written destroy() is gone: every timer, listener,
observer, DOM node, and the preview panel's destroy() chain now registers
on the PluginScope and unwinds automatically. Two behaviors this adds:
- data-gv-claude-turn-id stamps on Claude's own turn nodes are rolled
back on unmount (previously leaked).
- coachmarks accept an AbortSignal; a disposed scope closes an in-flight
guide as 'skipped' without burning its once-per-user seen state.
Startup registers as a pending scope effect, so unmounting mid-start
barriers on it instead of relying on a destroyed flag. updateSettings
stays as the fine-grained path — grow-only virtualized markers and the
rail DOM survive settings changes, unchanged. One-shot scope timers and
frames now release their ledger slot on firing, keeping debounce-heavy
consumers bounded. The 641-line behavior suite passes with only the
stop-is-now-async await adjustments.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 97ee149 commit ed025b7
8 files changed
Lines changed: 258 additions & 118 deletions
File tree
- src
- features/plugins
- builtin/claudeTimeline
- runtime
- pages/content
- coachmark
- __tests__
- timeline
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
630 | 640 | | |
631 | 641 | | |
632 | 642 | | |
633 | 643 | | |
634 | 644 | | |
635 | 645 | | |
636 | | - | |
| 646 | + | |
637 | 647 | | |
638 | 648 | | |
639 | 649 | | |
| |||
0 commit comments