Skip to content

Conversation

@ethan-james
Copy link
Collaborator

Fixes #3353

I added a max-width to TreeNode in order to stop it from overrunning the viewport width when the transform applied to indented thoughts exceeds the right padding. In order to do this, I needed to updated bulletWidth in LayoutTree in order to calculate the width of the bullet in the same way that it is calculated in Bullet. This might have unforeseen consequences, and I could duplicate that calculation inside TreeNode instead.

@ethan-james ethan-james self-assigned this Nov 12, 2025
@ethan-james
Copy link
Collaborator Author

ethan-james commented Nov 12, 2025

I also see that, at larger font sizes at widths exceeding the 560px breakpoint that I was targeting, we can also get some cutoff. I can try to fix that as part of this issue if you want.

Screenshot 2025-11-11 190803

@raineorshine
Copy link
Contributor

Sure! You can address the other case in this PR unless it ends up being a bigger change.

It would be great to get a puppeteer snapshot test covering this at different screen widths. Setting puppeteer's window width can be tricky sometimes, but give it a try.

@ethan-james
Copy link
Collaborator Author

Sure! You can address the other case in this PR unless it ends up being a bigger change.

It would be great to get a puppeteer snapshot test covering this at different screen widths. Setting puppeteer's window width can be tricky sometimes, but give it a try.

I added some tests, and they showing that my approach has problems with thought annotations. Putting the max-width on TreeNode doesn't work well with the padding applied to annotations. I could refactor my work to push the max-width down to StaticThought or Editable, but I think that first I should try to finish up #3352 and see if this works better without the ThoughtAnnotation placeholder.

@raineorshine
Copy link
Contributor

Okay, sounds good.

At the end we'll need to reduce this down to the fewest tests that are needed cover the behavior, since snapshot tests are expensive and we don't want to slow down the test suite unnecessarily.

@raineorshine raineorshine marked this pull request as draft November 13, 2025 19:17
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.

Thought width exceeds viewport width below around 500px

2 participants