Commit f1fee40
committed
refactor: address review feedback on the pinned PlanCard
Address code review feedback on cacdec3 (pin the latest ACP plan above
the chat transcript):
- SessionChatPane.svelte: key the PlanCard on session?.id so the
expanded/collapsed toggle resets when the pane is reused for a
different session, letting defaultExpanded apply per session instead
of a collapse in one session leaking into the next.
- acpTranscript.ts: drop the redundant Array.isArray(rawEntries)
re-check in latestPlan since arrayProp already returns
unknown[] | null; use a plain null check to match
latestAvailableCommands.
- acpTranscript.ts / acpTranscript.test.ts: remove the unused priority
field from PlanEntry, its parsing, and the test assertions, since
PlanCard never renders it. One raw input in the tests keeps a
priority prop to cover that unparsed props are dropped.
Verified with vitest (682 passing) and svelte-check (0 errors).
Signed-off-by: Matt Toohey <contact@matttoohey.com>1 parent cacdec3 commit f1fee40
3 files changed
Lines changed: 12 additions & 10 deletions
File tree
- apps/staged/src/lib/features/sessions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1737 | 1737 | | |
1738 | 1738 | | |
1739 | 1739 | | |
1740 | | - | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1741 | 1743 | | |
1742 | | - | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
1743 | 1747 | | |
1744 | 1748 | | |
1745 | 1749 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
722 | | - | |
| 721 | + | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
770 | | - | |
771 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | 281 | | |
283 | 282 | | |
284 | 283 | | |
| |||
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
296 | | - | |
| 295 | + | |
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
| |||
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | | - | |
306 | 304 | | |
307 | 305 | | |
308 | 306 | | |
| |||
0 commit comments