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
{{ message }}
Repository navigation
Text and Boxes need flexShrink=0 where they should not shrink #3775
@thdxr@kommander When there's not enough space to go around, it seems that flex gaps, margins etc are not honored, and some elements (like <text>) get collapsed. This o here is actually part of Todo which got hidden due to lack of vertical space. But I'm guessing the renderer didn't issue the correct ANSI sequence to explicitly delete that o, and since no other text (or background color) took its place it just remained displayed.
What terminal is this? Looks like a grapheme width issue, the checkmark is just one cell, in many other terminals/fonts the checkmark is two cells, so the width calculation for the grapheme is off. What is the Unicode/raw by sequence for that checkmark?
Edit: Is there a message before this one that has any emojis/CJK chars?
Ahh now I see what you mean. Okay that is curious. So by default all renderable yoga nodes are flexShrink = 1, so to avoid text nodes getting smashed into each other we can set flexShrink = 0 on the containers for the nodes. Then the container does not shrink and the text nodes do not overlap.
@kommander Hello, I am looking at this issue, is there any point where we would want the sidebar to be scrollable, if the window is a bit small to contain it all?
@veracioux For that I think they should have a fixed height, I can add that, but what I currently have made the whole sidebar scrollable if the window gets small.
Activity
github-actions commentedon Nov 2, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
thdxr commentedon Nov 2, 2025
lots of artifacts there but not sure what's going on
veracioux commentedon Nov 2, 2025
@thdxr @kommander When there's not enough space to go around, it seems that flex gaps, margins etc are not honored, and some elements (like
<text>) get collapsed. This o here is actually part of Todo which got hidden due to lack of vertical space. But I'm guessing the renderer didn't issue the correct ANSI sequence to explicitly delete that o, and since no other text (or background color) took its place it just remained displayed.kommander commentedon Nov 2, 2025
What terminal is this? Looks like a grapheme width issue, the checkmark is just one cell, in many other terminals/fonts the checkmark is two cells, so the width calculation for the grapheme is off. What is the Unicode/raw by sequence for that checkmark?
Edit: Is there a message before this one that has any emojis/CJK chars?
veracioux commentedon Nov 2, 2025
@kommander Don't think this has anything to do with grapheme width necessarily. Check this out (pay attention to the Context text):
Peek.2025-11-03.00-37.mp4
After I modfiy the code to set a background color on the
XX,XXX tokenstext, it doesn't show up anymore:Peek.2025-11-03.00-35.mp4
I don't see any special characters being rendered there: https://github.com/veracioux/opencode/blob/9fd672a1cb735eb7f8ec80ffbe9d7540e4687759/packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx#L52
This further confirms #3775 (comment) I think.
kommander commentedon Nov 3, 2025
Ahh now I see what you mean. Okay that is curious. So by default all renderable yoga nodes are
flexShrink = 1, so to avoid text nodes getting smashed into each other we can setflexShrink = 0on the containers for the nodes. Then the container does not shrink and the text nodes do not overlap.[-]Task list invalid start column[/-][+]Text and Boxes need flexShrink=0 where they should not shrink[/+]OpeOginni commentedon Nov 5, 2025
@kommander Hello, I am looking at this issue, is there any point where we would want the sidebar to be scrollable, if the window is a bit small to contain it all?
veracioux commentedon Nov 5, 2025
My 2 cents: I think the Modified Files and Todo sections would benefit from a scrollbox because their contents can get large for long sessions
OpeOginni commentedon Nov 5, 2025
@veracioux For that I think they should have a fixed height, I can add that, but what I currently have made the whole sidebar scrollable if the window gets small.
Screen.Recording.2025-11-05.at.17.37.02.mov
rekram1-node commentedon Nov 5, 2025
I kinda like that, that's cool
kommander commentedon Nov 5, 2025
Scrollbox makes sense and would solve the shrinking issue as well
OpeOginni commentedon Nov 5, 2025
Cool, Just doing some testing, then Ill get this PR out 🫡
thdxr commentedon Nov 5, 2025
nice
OpeOginni commentedon Nov 9, 2025
Want to get feedback on this. Was thinking of collapsable items in the sidebar, is it needed?
Screen.Recording.2025-11-09.at.16.05.36.mov
More of design decision
thdxr commentedon Nov 12, 2025
i like it would want to play with some of the styling/icon but i'd take a PR
OpeOginni commentedon Nov 12, 2025
Yeah, was thinking of making use of some icons from the
opencode/uipackage making it similar to the Desktop one.