fix: render showSpeed and showDuration in expanded layout#232
Open
hoklims wants to merge 2 commits intojarrodwatts:mainfrom
Open
fix: render showSpeed and showDuration in expanded layout#232hoklims wants to merge 2 commits intojarrodwatts:mainfrom
hoklims wants to merge 2 commits intojarrodwatts:mainfrom
Conversation
These config options were only implemented in the compact layout (renderSessionLine in session-line.ts). When using lineLayout: "expanded", enabling display.showSpeed or display.showDuration had no effect. This adds both options to renderProjectLine (the expanded layout's project line), matching the compact layout behavior: - showSpeed: output token speed (tok/s) - showDuration: session duration timer Fixes jarrodwatts#221 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes display.showSpeed and display.showDuration being ignored in expanded layout by adding the same rendering logic used in the compact renderSessionLine() to the expanded layout’s renderProjectLine().
Changes:
- Import
getOutputSpeed()into the expanded project-line renderer. - Render output speed (
out: … tok/s) whendisplay.showSpeedis enabled. - Render session duration (
⏱️ …) whendisplay.showDurationis enabled (default-on unless explicitlyfalse).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback by adding test coverage for the new expanded layout rendering of speed and duration: - duration shown when showDuration is true - duration omitted when showDuration is false - speed code path doesn't crash when showSpeed is true - speed omitted when showSpeed is false Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showSpeedandshowDurationconfig options having no effect in expanded layout moderenderProjectLine(the expanded layout's project line), matching the existing compact layout behavior inrenderSessionLineRoot Cause
showSpeedandshowDurationwere only implemented insrc/render/session-line.ts(compact layout). The expanded layout renderers undersrc/render/lines/had no corresponding logic, so these config options were silently ignored.Changes
src/render/lines/project.ts:getOutputSpeedfromspeed-tracker.tsshowSpeedrendering (output token speed in tok/s) after session nameshowDurationrendering (session timer) after speed, matching compact layout defaultsTest plan
npx tsc— compiles without errorsnode --test tests/render.test.js— all 73 render tests pass (no regressions)showSpeed: true/showDuration: trueCloses #221
🤖 Generated with Claude Code