Repository navigation
Commit 8fcc0e4
authored
fix(chat): 低于门槛的单步思考不再消失;卡片展开收起加动画 (#20)
Two defects from the user's live test (screenshots 63329 vs 63330):
1. Lone thinking dropped. The visibility gate was ROUND-level
(`!roundFolded || block.id in keepVisibleIds` with an always-empty
keepVisibleIds), so once ANY run in the round carded, every block not
owned by a card was hidden — including the lone thinking of a
thinking→reply-text run (1 step, below the 2-step card threshold,
nothing else to render it). The user saw the thinking bubble simply
disappear when folding was on. The gate is block-level now
(`block.id !in foldedBlockIds`): a block no card owns renders inline.
Same fix in shouldShowProcessToolRow — its roundFolded branch hid
below-threshold tool blocks the same way.
The card threshold itself is unchanged: a run needs ≥ 2 steps
("超过1步则进入折叠"), one step stays inline — now visibly so.
2. Screen flash on expand/collapse. The row list appeared in a single
frame and the whole list jumped. The card container now animates its
size change (gentle spring), so it grows/shrinks in place while the
list reflows around it.
Also deletes ROUND_MIN_FOLDABLE_STEPS — a dead constant (zero
references) left over from the pre-card round-fold model that only
misleads readers about the threshold.
Regression test: a carded run followed by a lone thinking + reply text —
the card forms, its steps stay inside it, and the lone thinking renders
inline.
Co-authored-by: tall-1997 <278631348+tall-1997@users.noreply.github.com>1 parent 842a4c9 commit 8fcc0e4
3 files changed
Lines changed: 71 additions & 13 deletions
File tree
- src/android/app/src
- main/java/com/openminis/app/ui/chat
- test/java/com/openminis/app/ui/chat
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
1056 | 1059 | | |
1057 | 1060 | | |
1058 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1059 | 1073 | | |
1060 | 1074 | | |
1061 | 1075 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | 452 | | |
456 | 453 | | |
457 | 454 | | |
| |||
813 | 810 | | |
814 | 811 | | |
815 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
816 | 821 | | |
817 | 822 | | |
818 | 823 | | |
| |||
831 | 836 | | |
832 | 837 | | |
833 | 838 | | |
834 | | - | |
835 | | - | |
| 839 | + | |
836 | 840 | | |
837 | 841 | | |
838 | 842 | | |
| |||
950 | 954 | | |
951 | 955 | | |
952 | 956 | | |
953 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
954 | 961 | | |
955 | 962 | | |
956 | 963 | | |
| |||
1090 | 1097 | | |
1091 | 1098 | | |
1092 | 1099 | | |
1093 | | - | |
1094 | | - | |
| 1100 | + | |
| 1101 | + | |
1095 | 1102 | | |
1096 | 1103 | | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1102 | 1112 | | |
1103 | 1113 | | |
1104 | 1114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
119 | 153 | | |
120 | 154 | | |
121 | 155 | | |
| |||
0 commit comments