Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Dec 20, 2025

Summary

Two UX improvements for init hook output:

Auto-scroll to bottom while running

  • Uses flex-col-reverse with reversed array for CSS-based scroll anchoring
  • No refs or effects needed - scroll naturally stays at bottom as lines are added

Duration display on completion

  • Tracks startTime (from init-start) and endTime (from init-end)
  • Computes durationMs and adds it to the DisplayedMessage type
  • Shows human-friendly duration formatting:
    • <1s: milliseconds (e.g., "832ms")
    • 1-10s: decimal seconds (e.g., "3.2s")
    • 10-60s: whole seconds (e.g., "45s")
    • >60s: minutes and seconds (e.g., "2m 15s")
  • Duration shown for both success and error states

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

- Auto-scroll output to bottom while init hook is running
- Track startTime/endTime in StreamingMessageAggregator
- Add durationMs to workspace-init DisplayedMessage type
- Show human-friendly duration on completion (e.g., '3.2s', '2m 15s')
- Duration shown for both success and error states
@ammar-agent ammar-agent force-pushed the init-hook-scroll-duration branch from 23e7668 to add9198 Compare December 20, 2025 19:30
@ammario ammario merged commit 4602709 into main Dec 20, 2025
20 checks passed
@ammario ammario deleted the init-hook-scroll-duration branch December 20, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants