Commit bcdf9ef
authored
fix(v1.2.1): input line-wrap bug, live bottom separator, restore header (#33)
* fix(v1.2.1): input line-wrap bug, live bottom separator, restore header
- Fix extra blank line when user text fills exactly one terminal row
(exact boundary detection in cursor position calculation)
- Add bottom separator line that renders live while typing, growing
with wrapped text (previously only appeared on Enter)
- Restore styled purple header box for all users, not just first-time
- Remove unused imports (existsSync, path)
- Bump version to 1.2.1
* fix(v1.2.1): input line-wrap extra line, header box right border
- Fix extra blank line when typed text fills exactly one terminal row
by skipping the \n before the bottom separator when the terminal has
already auto-wrapped the cursor.
- Fix header box right border misalignment caused by emoji width
variance: use ANSI absolute column positioning (\x1b[<col>G) to
place the closing │ at a fixed column matching the top/bottom corners.
* fix(repl): header box alignment and bottom separator persistence
- Header box: use ANSI CHA (\x1b[<col>G) + EL (\x1b[K) to position
the right │ at a fixed column (43) matching the top/bottom corners,
regardless of terminal emoji width rendering (2 vs 3 cols for 🥥).
- Bottom separator: preserve it on screen after the user presses Enter.
clearMenu now moves the cursor past the separator before erasing,
so the separator stays visible while the agent is thinking/responding.
* fix(repl): use string-width for header box alignment (boxen approach)
Replace custom visualWidth() with the industry-standard `string-width`
package (6900+ npm dependents, used by boxen/ink/chalk ecosystem).
The header box now uses pure space-padding (like boxen) instead of ANSI
cursor positioning. stringWidth correctly measures emoji, ZWJ sequences,
and CJK characters via Intl.Segmenter + grapheme clusters, so the right
│ border always aligns with the ╮/╯ corners regardless of terminal emoji
width rendering.
* fix(repl): move emoji outside box for perfect right border alignment
Emoji widths are unpredictable across terminals (🥥 renders as 2 or 3
cols depending on the emulator). No JS library — including string-width
— can query the actual terminal rendering width. This mismatch caused
the right │ to be offset on the title line.
Move the 🥥 emoji outside the box (before the top-left corner) so only
ASCII content lives inside. ASCII chars always have width 1, making the
right border perfectly continuous across all terminals and emulators.
* fix(repl): adjust top border indent to match emoji terminal width
* fix(repl): nudge top border line right to align with box body
* fix(repl): remove emoji from header box for clean alignment
* refactor(repl): rename header to "COCO - Coding Agent"
Simplify branding: the npm scope @corbat-tech already carries the
company name, so the product name in the header is just "COCO".
Added "- Coding Agent" descriptor for clarity.
* refactor(repl): 3-line header with tagline and color hierarchy
- COCO in bold white (protagonist)
- "code that converges to quality" tagline in magenta (brand color)
- "open source • corbat.tech" in dim (attribution)
* chore: bump version to 1.2.21 parent 3ac6262 commit bcdf9ef
4 files changed
Lines changed: 109 additions & 115 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
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 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
110 | 68 | | |
111 | 69 | | |
112 | 70 | | |
| |||
521 | 479 | | |
522 | 480 | | |
523 | 481 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | 482 | | |
539 | 483 | | |
540 | 484 | | |
541 | 485 | | |
542 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
543 | 493 | | |
544 | | - | |
| 494 | + | |
545 | 495 | | |
546 | | - | |
547 | | - | |
548 | 496 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | 497 | | |
554 | | - | |
555 | | - | |
556 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
557 | 524 | | |
558 | 525 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
573 | 529 | | |
574 | 530 | | |
575 | 531 | | |
| |||
650 | 606 | | |
651 | 607 | | |
652 | 608 | | |
653 | | - | |
| 609 | + | |
654 | 610 | | |
655 | 611 | | |
656 | 612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
230 | 245 | | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
234 | 252 | | |
235 | 253 | | |
236 | 254 | | |
| |||
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| 278 | + | |
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
263 | 282 | | |
264 | 283 | | |
| 284 | + | |
265 | 285 | | |
266 | 286 | | |
267 | 287 | | |
| |||
287 | 307 | | |
288 | 308 | | |
289 | 309 | | |
| 310 | + | |
290 | 311 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | 312 | | |
299 | 313 | | |
| 314 | + | |
300 | 315 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
307 | 320 | | |
308 | 321 | | |
309 | | - | |
310 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
311 | 330 | | |
312 | 331 | | |
313 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
314 | 336 | | |
315 | | - | |
316 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
317 | 342 | | |
318 | 343 | | |
319 | 344 | | |
| |||
323 | 348 | | |
324 | 349 | | |
325 | 350 | | |
326 | | - | |
| 351 | + | |
327 | 352 | | |
| 353 | + | |
328 | 354 | | |
329 | 355 | | |
330 | 356 | | |
331 | 357 | | |
332 | 358 | | |
333 | 359 | | |
334 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
335 | 364 | | |
336 | 365 | | |
337 | | - | |
338 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
339 | 374 | | |
340 | 375 | | |
341 | 376 | | |
| |||
372 | 407 | | |
373 | 408 | | |
374 | 409 | | |
| 410 | + | |
375 | 411 | | |
376 | 412 | | |
377 | 413 | | |
| |||
580 | 616 | | |
581 | 617 | | |
582 | 618 | | |
583 | | - | |
584 | | - | |
| 619 | + | |
585 | 620 | | |
586 | | - | |
587 | 621 | | |
588 | 622 | | |
589 | 623 | | |
| |||
0 commit comments