fix(web): hide conversation outline when it cannot expand - #1278
Conversation
🦋 Changeset detectedLatest commit: 42b17b9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d00426bd0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| onMounted(() => { | ||
| const parent = navRef.value?.offsetParent as HTMLElement | null; | ||
| if (!parent) return; |
There was a problem hiding this comment.
Re-measure after the TOC becomes visible
When this component mounts while visible is false, such as during sessionLoading, on mobile, or before a conversation has more than one user turn, navRef is null and this early return prevents both the initial measurement and the ResizeObserver setup. If the TOC later becomes visible, fits stays at its default true, so the outline is shown even in the narrow layouts this change is meant to hide. Watch visible/navRef and initialize measurement after the nav is rendered.
Useful? React with 👍 / 👎.
commit: |
When ConversationToc mounts while hidden (sessionLoading, mobile, or before a second user turn), navRef is null and the ResizeObserver is never set up, so fits stays true and the outline shows even in narrow layouts. Re-initialize the measurement whenever the nav is rendered.
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Related Issue
No linked issue — this is a small robustness fix for the web conversation outline.
Problem
The conversation outline (the rail of bars beside the chat) reveals each query's title on hover/focus, expanding up to 220px of label to the right. The previous guard was a hard-coded
@container (max-width: 920px)rule, so between roughly 920px and 1254px of pane width the rail stayed visible but its expanded labels clipped against the right edge of the pane / window.What changed
ConversationToc.vuenow measures the room to the right of the reading column with aResizeObserveron its positioning container. When the expanded label (240px, including a small buffer) would not fit, the rail is hidden viavisibility: hiddenrather than being unmounted, so its position keeps getting measured and it reappears automatically once space is available again. This replaces the static container query with a check that tracks the actual layout (reading-column width, docked panels, window resizes).Checklist
typecheck+check:style.)gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.