Skip to content

cap the step count#215

Open
meganrm wants to merge 1 commit into
mainfrom
fix/example-trajectory-bar
Open

cap the step count#215
meganrm wants to merge 1 commit into
mainfrom
fix/example-trajectory-bar

Conversation

@meganrm
Copy link
Copy Markdown
Contributor

@meganrm meganrm commented May 28, 2026

Problem

Estimated review size: small

closes #210

Solution

capped the step size of the bar with @claude

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to Verify:

  1. bun dev
  2. go to page 16 (open admin panel by clicking control+option+1)
  3. check bar

Screenshots (optional):

before
Screenshot 2026-05-26 at 3 08 00 PM

Screenshot 2026-05-28 at 12 56 20 PM

@meganrm meganrm requested a review from a team as a code owner May 28, 2026 19:56
@meganrm meganrm requested review from Copilot, frasercl and toloudis and removed request for a team May 28, 2026 19:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Caps the number of steps rendered in the live concentration bar so that each step (plus its 2px gap) has at least 4px of width, preventing visual issues on page 16 where high maxConcentration values caused the bar to render incorrectly.

Changes:

  • Compute maxSteps from the available width (at least 4px per step).
  • Use Math.min(maxConcentration, Math.max(1, maxSteps)) to ensure at least 1 step and never exceed the available width.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

example trajectory bars are showing incorrectly

3 participants