You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve status indicator and completion time display
- Show 'working...' shimmer text with elapsed time in status indicator
- Swap credits and elapsed time order in message completion (credits first)
- Document ShimmerText reconciliation issues with <box> in knowledge.md
Copy file name to clipboardExpand all lines: cli/knowledge.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,6 +360,55 @@ The cleanest solution is to use a direct ternary with separate `<text>` elements
360
360
361
361
**Note:** Helper components like `ConditionalText` are not recommended as they add unnecessary abstraction without providing meaningful benefits. The direct ternary pattern is clearer and easier to maintain.
362
362
363
+
### Combining ShimmerText with Other Inline Elements
364
+
365
+
**Problem**: When you need to display multiple inline elements alongside a dynamically updating component like `ShimmerText` (e.g., showing elapsed time + shimmer text), using `<box>` causes reconciliation errors.
366
+
367
+
**Why `<box>` fails:**
368
+
369
+
```tsx
370
+
// ❌ PROBLEMATIC: ShimmerText in a <box> with other elements causes reconciliation errors
- Avoid wrapping dynamically updating components (like ShimmerText) in `<box>` elements
406
+
- Use Fragments to group inline elements that will be wrapped in `<text>` by the parent
407
+
- Include spacing as part of the text content (e.g., `"{elapsedSeconds}s "` with trailing space)
408
+
- Let the parent component provide the `<text>` wrapper for proper rendering
409
+
410
+
This pattern works because all elements remain inline within a single stable `<text>` container, avoiding the reconciliation issues that occur when ShimmerText updates inside a `<box>`.
411
+
363
412
### The "Text Must Be Created Inside of a Text Node" Error
0 commit comments