Commit 1d2569c
committed
Improve text editor reliability and fix wrapping behavior
- Replace arbitrary timeouts with deterministic browser idle detection
in Playwright tests
- Fix line wrapping to use full available width (trim trailing spaces
from length calculation)
- Simplify rich text editor by removing plaintext mode and markdown
transition plugin
- Consolidate IndentPlugin to work with paragraph-based structure
(remove PlainTextIndentPlugin)
- Add comprehensive test utilities for browser idle detection with
examples and documentation
Fix linewrap tests to expect trimmed newLine values
Tests for the rich text editor's linewrap behavior were failing because expectations assumed trailing spaces would be preserved. Update assertions to expect trimmed newLine values (and document that whitespace-only lines become empty) so the tests reflect the actual trimming behavior implemented in the linewrap logic.
Preserve single newlines when extracting editor text
Fix extra blank lines produced by getTextContent(): instead of using getRoot().getTextContent(), iterate over root children, extract each paragraph's text, and join with single '\n'. This prevents added empty lines between paragraphs and resolves the failing test that was seeing too many newlines.1 parent c498c30 commit 1d2569c
File tree
26 files changed
+1486
-987
lines changed- apps
- desktop/src/components
- codegen
- editor
- web/src
- lib/components/chat
- routes/(app)/[ownerSlug]/[projectSlug]/reviews/[branchId]
- packages/ui
- src
- lib/richText
- css
- plugins
- stories/components
- tests
26 files changed
+1486
-987
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | 332 | | |
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
338 | | - | |
339 | 337 | | |
340 | 338 | | |
341 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
30 | | - | |
31 | 27 | | |
32 | 28 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 29 | | |
40 | | - | |
41 | | - | |
42 | 30 | | |
43 | 31 | | |
44 | 32 | | |
45 | 33 | | |
46 | 34 | | |
47 | | - | |
48 | 35 | | |
49 | 36 | | |
50 | 37 | | |
| |||
59 | 46 | | |
60 | 47 | | |
61 | 48 | | |
62 | | - | |
63 | 49 | | |
64 | 50 | | |
65 | 51 | | |
| |||
70 | 56 | | |
71 | 57 | | |
72 | 58 | | |
73 | | - | |
74 | 59 | | |
75 | 60 | | |
76 | 61 | | |
| |||
84 | 69 | | |
85 | 70 | | |
86 | 71 | | |
87 | | - | |
88 | 72 | | |
89 | 73 | | |
90 | 74 | | |
| |||
109 | 93 | | |
110 | 94 | | |
111 | 95 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 96 | | |
116 | 97 | | |
117 | 98 | | |
| |||
128 | 109 | | |
129 | 110 | | |
130 | 111 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 112 | + | |
149 | 113 | | |
150 | 114 | | |
151 | 115 | | |
| |||
173 | 137 | | |
174 | 138 | | |
175 | 139 | | |
176 | | - | |
| 140 | + | |
177 | 141 | | |
178 | 142 | | |
179 | 143 | | |
| |||
187 | 151 | | |
188 | 152 | | |
189 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
190 | 157 | | |
191 | 158 | | |
192 | 159 | | |
| |||
197 | 164 | | |
198 | 165 | | |
199 | 166 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
206 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
207 | 181 | | |
208 | 182 | | |
209 | 183 | | |
| |||
213 | 187 | | |
214 | 188 | | |
215 | 189 | | |
216 | | - | |
| 190 | + | |
| 191 | + | |
217 | 192 | | |
218 | 193 | | |
219 | 194 | | |
| |||
226 | 201 | | |
227 | 202 | | |
228 | 203 | | |
229 | | - | |
| 204 | + | |
230 | 205 | | |
231 | 206 | | |
232 | 207 | | |
| |||
239 | 214 | | |
240 | 215 | | |
241 | 216 | | |
242 | | - | |
| 217 | + | |
| 218 | + | |
243 | 219 | | |
244 | 220 | | |
245 | 221 | | |
| |||
282 | 258 | | |
283 | 259 | | |
284 | 260 | | |
285 | | - | |
286 | 261 | | |
287 | 262 | | |
288 | 263 | | |
| |||
305 | 280 | | |
306 | 281 | | |
307 | 282 | | |
308 | | - | |
309 | 283 | | |
310 | 284 | | |
311 | 285 | | |
312 | 286 | | |
313 | | - | |
314 | 287 | | |
315 | 288 | | |
316 | 289 | | |
317 | | - | |
| 290 | + | |
318 | 291 | | |
319 | 292 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
337 | 297 | | |
338 | 298 | | |
339 | 299 | | |
| |||
355 | 315 | | |
356 | 316 | | |
357 | 317 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | 318 | | |
372 | 319 | | |
373 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
0 commit comments