Commit cc8cb23
authored
fix: harden markdown rendering and session/runtime history handling (#177)
* fix: harden session history and prompt rendering
- normalize wrapped markdown fences before rendering so malformed nested csv blocks still display correctly
- page agent session history from the newest 10 messages and prepend older messages on scroll instead of hydrating the full thread
- forward paginated history and per-input output event requests through the desktop bridge and runtime history API
- hide internal runtime memory paths from resume prompts so the model does not create a workspace runtime folder from leaked metadata
- make Pi prompts explicitly state when attachments and image inputs are absent to reduce image-attachment hallucinations
- add focused regression coverage for markdown normalization, history pagination, runtime memory guards, and no-attachment prompts
- validation:
- node --test desktop/src/components/marketplace/SimpleMarkdown.test.mjs desktop/src/components/panes/ChatPane.history-pagination.test.mjs desktop/electron/session-history-pagination.test.mjs runtime/history-pagination.source.test.mjs runtime/internal-runtime-memory-guard.source.test.mjs runtime/no-attachment-image-prompt.source.test.mjs
- npm --prefix desktop run typecheck
* test: align Pi prompt expectations with explicit no-attachment guidance
- update the harness-host runPi success test to expect the explicit attachments-none and image-inputs-none prompt text
- keep the full runtime harness-host suite aligned with the new prompt hardening behavior
- validation:
- npm run runtime:harness-host:test
* fix: seed new browser spaces from the sibling workspace tab
- initialize an empty browser space from the active tab in the other space for the same workspace before falling back to the default home page
- keep mirrored first-tab seeding from duplicating browser history entries
- extend the browser space routing source test to lock the cross-space seeding behavior
- validation:
- node --test desktop/electron/browser-space-routing.test.mjs
- npm run desktop:typecheck
- npm run desktop:e2e1 parent db27ae7 commit cc8cb23
File tree
24 files changed
+974
-116
lines changed- desktop
- electron
- src
- components
- marketplace
- panes
- types
- runtime
- api-server/src
- harness-host/src
- state-store/src
24 files changed
+974
-116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
16 | 30 | | |
17 | 31 | | |
18 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2624 | 2624 | | |
2625 | 2625 | | |
2626 | 2626 | | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2627 | 2635 | | |
2628 | 2636 | | |
2629 | 2637 | | |
| |||
2635 | 2643 | | |
2636 | 2644 | | |
2637 | 2645 | | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
2638 | 2651 | | |
2639 | 2652 | | |
2640 | 2653 | | |
| |||
13067 | 13080 | | |
13068 | 13081 | | |
13069 | 13082 | | |
| 13083 | + | |
13070 | 13084 | | |
13071 | 13085 | | |
13072 | 13086 | | |
| |||
13077 | 13091 | | |
13078 | 13092 | | |
13079 | 13093 | | |
13080 | | - | |
13081 | | - | |
| 13094 | + | |
| 13095 | + | |
13082 | 13096 | | |
13083 | 13097 | | |
13084 | 13098 | | |
13085 | 13099 | | |
13086 | 13100 | | |
13087 | | - | |
13088 | | - | |
| 13101 | + | |
13089 | 13102 | | |
13090 | 13103 | | |
13091 | 13104 | | |
13092 | 13105 | | |
13093 | | - | |
| 13106 | + | |
13094 | 13107 | | |
13095 | | - | |
13096 | | - | |
13097 | | - | |
| 13108 | + | |
| 13109 | + | |
| 13110 | + | |
| 13111 | + | |
13098 | 13112 | | |
13099 | 13113 | | |
13100 | 13114 | | |
13101 | 13115 | | |
13102 | 13116 | | |
13103 | 13117 | | |
13104 | 13118 | | |
13105 | | - | |
| 13119 | + | |
| 13120 | + | |
| 13121 | + | |
| 13122 | + | |
| 13123 | + | |
13106 | 13124 | | |
13107 | 13125 | | |
13108 | 13126 | | |
13109 | 13127 | | |
13110 | 13128 | | |
13111 | 13129 | | |
13112 | | - | |
| 13130 | + | |
13113 | 13131 | | |
13114 | 13132 | | |
13115 | 13133 | | |
13116 | | - | |
| 13134 | + | |
13117 | 13135 | | |
| 13136 | + | |
13118 | 13137 | | |
13119 | 13138 | | |
13120 | 13139 | | |
| |||
14744 | 14763 | | |
14745 | 14764 | | |
14746 | 14765 | | |
| 14766 | + | |
| 14767 | + | |
| 14768 | + | |
| 14769 | + | |
14747 | 14770 | | |
14748 | 14771 | | |
14749 | 14772 | | |
| |||
17552 | 17575 | | |
17553 | 17576 | | |
17554 | 17577 | | |
| 17578 | + | |
| 17579 | + | |
| 17580 | + | |
| 17581 | + | |
| 17582 | + | |
| 17583 | + | |
| 17584 | + | |
| 17585 | + | |
| 17586 | + | |
| 17587 | + | |
| 17588 | + | |
| 17589 | + | |
| 17590 | + | |
| 17591 | + | |
| 17592 | + | |
| 17593 | + | |
| 17594 | + | |
| 17595 | + | |
| 17596 | + | |
| 17597 | + | |
| 17598 | + | |
| 17599 | + | |
| 17600 | + | |
| 17601 | + | |
| 17602 | + | |
| 17603 | + | |
| 17604 | + | |
| 17605 | + | |
| 17606 | + | |
| 17607 | + | |
| 17608 | + | |
| 17609 | + | |
| 17610 | + | |
| 17611 | + | |
| 17612 | + | |
| 17613 | + | |
| 17614 | + | |
17555 | 17615 | | |
17556 | 17616 | | |
17557 | 17617 | | |
| |||
17562 | 17622 | | |
17563 | 17623 | | |
17564 | 17624 | | |
| 17625 | + | |
17565 | 17626 | | |
17566 | | - | |
| 17627 | + | |
17567 | 17628 | | |
17568 | 17629 | | |
17569 | 17630 | | |
| |||
19810 | 19871 | | |
19811 | 19872 | | |
19812 | 19873 | | |
19813 | | - | |
19814 | | - | |
| 19874 | + | |
| 19875 | + | |
19815 | 19876 | | |
19816 | 19877 | | |
19817 | 19878 | | |
19818 | 19879 | | |
19819 | | - | |
19820 | | - | |
| 19880 | + | |
| 19881 | + | |
19821 | 19882 | | |
19822 | 19883 | | |
19823 | 19884 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
674 | 682 | | |
675 | 683 | | |
676 | 684 | | |
| |||
682 | 690 | | |
683 | 691 | | |
684 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
685 | 698 | | |
686 | 699 | | |
687 | 700 | | |
| |||
1261 | 1274 | | |
1262 | 1275 | | |
1263 | 1276 | | |
1264 | | - | |
| 1277 | + | |
1265 | 1278 | | |
1266 | | - | |
| 1279 | + | |
1267 | 1280 | | |
1268 | 1281 | | |
1269 | 1282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| |||
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | | - | |
| 145 | + | |
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments