Repository navigation
Conversation
The chat-history drawer's flex children (.thread-drawer-head, .thread-new, and .thread-item) left flex-shrink at its CSS default of 1, so the browser compressed them to fit the panel once the list overflowed. Rows shrank below their natural height, clipping titles and hiding the scrollbar. Opt each drawer child out of shrinking with flex: 0 0 auto so the scrollable .thread-list keeps its rows at natural height and scrolls. Add a Playwright regression test asserting row height is independent of the number of conversations and that the list overflows. Closes the thread-drawer squashing bug.
|
Thanks — the implementation itself looks good and the fix is scoped correctly. Using There is just one small CI issue left. The This comes from: TypeScript does not narrow the type based on the Playwright assertion. I would make the evaluated code fail explicitly if After that, please rerun CI. No production logic changes are needed from my side — once CI is green, this looks ready to approve. |
What is wrong
In the widget's chat history drawer ("Chats"), conversation rows get squashed instead of scrolling once there are many conversations. Each row shrinks below its natural height until only the padding is left, so titles get clipped at the top and bottom and rows visually overlap. With ~20 conversations there is no scrollbar at all.
Why it happens
.thread-listis adisplay: flex; flex-direction: columncontainer. Its children.thread-drawer-head,.thread-new, and.thread-itemnever setflex-shrink, so they keep the CSS defaultflex-shrink: 1and the browser shrinks them to make the content fit the container — instead of overflowing and triggeringoverflow-y: auto.Suggested fix
Opt the drawer's children out of shrinking:
Things to watch out for
.thread-itemuseswhite-space: nowrap; overflow: hidden; text-overflow: ellipsis, which hides the symptom horizontally but not the vertical clipping — the row boxes themselves are too short..thread-listalready has the correctflex: 1; min-height: 0; overflow-y: auto; the bug is one level down, in the children..messages(the message list) has the sameflex: 1; min-height: 0; overflow-y: autopattern, but its content wrapper.conversation-contentusesmin-height: 100%, so it is not affected.src/agent_manager/api/static/widget.jsis the built bundle and contains a copy of this CSS — rebuilt after the fix.Verification
npm run build:widget— bundle rebuilt with the three rules.npm run typecheck:widget— clean.npm run test:widget—widget self-check: OK.npx playwright test— 41 passed, including the new regression test.