Repository navigation
Studio: Chat with files X hides the panel, app tooltips, and higher-contrast traces - #13989
Conversation
…ips and centred Add files in its header
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…p as the pills from the bottom
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: febab8151e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| )); | ||
| const fileCount = documents.length + projectDocuments.length; | ||
| useEffect(() => { | ||
| useChatRuntimeStore.getState().setRagPanelFileCount(fileCount); |
There was a problem hiding this comment.
Report the selected knowledge base's file count
When the active retrieval source is a knowledge base, both document hooks above receive a null scope and clear documents and projectDocuments, so this effect publishes zero regardless of how many documents the selected KB contains. After hiding the KB panel, the new Show files item therefore omits its count even though KnowledgeBase.documentCount is available; derive the hidden-panel count from the active KB when ragSource.type === "kb".
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing: with a knowledge base active the panel lists no files (it names the KB and links to Manage files), so Show files has no count to mirror; the item still works, it just shows no badge.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
## Summary `Frontend build + bundle sanity` is red on main again since #13989, which merged with it red. Main at 1574001 measures 6,798,138 B raw / 2,044,579 B transfer, against 6,796,959 / 2,044,391 set in #13991. #13989 is the only frontend change since #13991 (Chat with files closing on its X, app tooltips, higher-contrast traces). It adds 1,339 B raw / 377 B transfer: 6,796,799 -> 6,798,138 B raw and 2,044,202 -> 2,044,579 B transfer, one machine and build, Node 24, `rm -rf dist` first, chunk count unchanged at 95. ## Change The budget is raised by that growth, so main keeps the margin it had (160 B raw, 189 B transfer), and the measurement is recorded beside the limits. ## Testing - `npm run build && npm run bundle:check` on main with this change: within budget (0.2 KB transfer, 0.2 KB raw to spare). Without it: over by 1,179 B raw / 188 B transfer. - `tests/bundle-budget-cli.test.ts` and `tests/bundle-budget-closure.test.ts`: 43 passed. - `prettier --check scripts/check-bundle-budget.ts`: clean.
…essage (#13999) ## What changed Follow-up to #13989, whose last commit landed on its branch a moment after it was merged. When you hide the Chat with files panel in a new chat and then send the first message, the panel now stays hidden. Sending the first message moves the composer from the welcome screen to the chat dock, which remounts the files bar; the reset that shows a hidden panel again ran on every mount, so the panel reappeared in the same chat. The reset now keys on the last chat id kept outside the component, so only a real switch to another chat shows the panel again. ## Verification - `npm run typecheck`, `npm run build`, full `npm test` (all pass); `tests/rag-panel-hide.test.ts` covers the keyed reset. - Isolated Studio with a GGUF model: open Chat with files, hide it, send the first message; after the reply the panel is still hidden and the RAG tag is still in the composer.
…slothai#14125) Fixes unslothai#13876 ## What changed In a project chat with Chat with files (RAG) off, the **Project sources** panel above the composer had a collapse chevron but no way to close it, so it kept a header and a row of file pills over every project chat. unslothai#13989 gave the Chat with files and knowledge base panels an X that hides the panel; this gives the Project sources panel the same X, labelled **Hide sources**. - Hiding only hides the panel. The chat still retrieves from the project's sources, exactly as before. - It uses the same per-chat hidden state as the other panels, so the panel comes back when you open another chat, or when you turn on Chat with files from the + menu (which shows the full files panel, project sources included). Turning RAG off from the composer tag also shows it again. - Nothing else moves: collapse, Show all, the cards and the RAG-on panels are unchanged. ## Verification - `tests/rag-panel-hide.test.ts`: the X count goes from 2 to 3 panels, plus a new test that the RAG-off project panel honours the hidden state and carries the Hide sources X. Both fail with the component change reverted and pass with it. - `npm run typecheck`, full `npm test`, `vite build`. - Isolated Studios built from the merge base and from this branch, driven with Playwright (1440x900): a project with one source and a chat in it, RAG off. Before: the panel has only Collapse files, and is still there after the scene looks for a close button. After: Hide sources is in the header, and clicking it removes the panel while the composer stays. ## Screenshots Opening the project chat: the same panel on both sides, with the new X on the right.  After clicking Hide sources (no such button before): the panel is gone and the chat has its space back. 
What changed
Chat with files panel
The X hides the panel instead of turning RAG off. Retrieval stays on and the composer keeps its RAG tag, so the chat still searches its files. The control is now labelled "Hide files", and the knowledge base panel's X behaves the same way.
Show files brings it back. While the panel is hidden, the RAG tag's menu leads with Show files and the chat's file count. Choosing Chat with files in the + menu, picking a source, turning RAG back on, or opening another chat also shows the panel again.
Header controls use the app's tooltip (Add files, Collapse / Expand files, Hide files) instead of the browser's
titlepopup.Add files is centred in its pill. Centred by its line box, the cap-height label sat half a pixel high; it now measures within a third of a pixel (9.33px above, 9.67px below at 3x).
Header padding follows the smaller Add files pill. The panel's top padding drops 2px (expanded) so the 28px pill keeps its old distance from the top edge, and in the collapsed pill view Add files sits 12px from the top, the same as the file pills from the bottom.
The gaps between Add files, the chevron and the X were measured and are already equal (28px from the pill edge to the chevron glyph, and from the chevron glyph to the X glyph), so they are unchanged.
Thinking and tool traces
Trace ink sits one shade nearer the answer's ink: lighter in dark mode, darker in light mode.
--trace-fadedrops from 24% to 13% (dark) and 15% to 7% (light), and inside reasoning, tool and tool-group traces the muted text and the citation chip outlines move 15% toward the foreground. Measured on the "Worked for" trigger: OKLab L 0.626 to 0.686 in dark mode, 0.616 to 0.580 in light mode. Hover to the foreground still wins (the trace rule uses:where).Verification
npm run typecheck,npm run build, fullnpm test(all pass). Newtests/rag-panel-hide.test.ts;tests/rag-thread-initialization.test.tsstub gains the new store fields.Not tested here
Knowledge base retrieval end to end (the KB panel's X uses the same hide path).