Skip to content

Studio: attach saved Library files to the current chat - #16522

Merged
danielhanchen merged 4 commits into
mainfrom
fix/library-chat-file-picker
Nov 4, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
fix/library-chat-file-picker

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Saved Library files cannot currently be selected from an ongoing conversation. Add + > More > Attach from Library, with searchable saved uploads and generated files that attach through the current composer's existing processing.

The picker preserves the draft and conversation, including project drafts. It reuses Library's file validation and size limits, checks the active account and conversation after reading, and ignores repeated selections while a file is loading. It closes when Chat becomes inactive and opens after the menu releases its pointer lock. Existing file uploads, skill mentions and Library's Start chat action retain their behavior.

Fixes #16485

Validation at 5b67961:

  • Production frontend build and TypeScript check pass.
  • All 11 focused helper/component tests pass.
  • Full frontend suite: 14,752 passed, one pre-existing settings-spacing failure and one skip, matching the previous head. The same failure was reproduced on the PR merge base and rejects three fixed lengths in the untouched settings dialog.
  • The strict live-browser check verifies the action is absent from the main dropdown and works through More. Two attach/remove/reattach cycles preserve exact file bytes, one attachment each time, the draft and thread. Ordinary sidebar navigation works, and Back closes the picker with the same document and retained composer.
  • Fresh before/after browser captures at the merge base and this head show sample files in the picker, filename search, and a saved image and document attached together. Their original bytes match, the image preview loads, and the draft and conversation remain intact.
  • Chromium, Firefox, WebKit and Edge pass the before/after walkthrough. Every head arm attaches the original image and document, preserves the draft/thread, and closes the picker on Back. An initial WebKit check held a stale element reference before navigation; the corrected evidence check was rerun successfully, without a PR source change.

Current-head broader validation at 5b67961 passed scoped Linux, Windows and macOS staging and paired Studio/Desktop staging. All three OS comparisons report NO_REGRESSION, including the Linux Desktop arms. The full selected Studio suite also reports NO_REGRESSION on a remote Colab A100. Existing Library backend route tests passed 159 checks with one filesystem-specific skip on both unchanged backend arms. No local GPU was used.

Non-passing coverage is recorded separately: the remote compaction notice check failed on both arms, and Linux staging's inference-settings load check failed on both arms. These checks are not counted as passing coverage. A separate local full-suite attempt hit the installer timeout under host load; the remote run covers the same six selected targets at the same source SHAs.

Library attachment walkthrough

Real browser captures from separate installs of merge base 1a951a93d and head 5b67961, using synthetic sample files.

1. Open + > More. Attach from Library is in the More submenu.

Attach from Library inside the More submenu

2. Choose a saved file. The picker shows a sample image, Markdown campaign brief, CSV sales data, text report and generated plan, with Uploaded and Generated labels.

Populated Library attachment picker with sample files

3. Search by filename. Typing spring narrows the list to spring-campaign.png.

Search for the saved sample image

4. Continue the same draft. The sample image and document are attached together, and the image preview is loaded.

The sample image and document attached to the preserved draft

Before and after with the same draft

The merge base has no saved-file selection in More. The PR attaches the image and document from Library without starting another conversation. The comparison preserves the original pixel scale.

Before and after attaching the sample image and document

Studio UI regression check

Base 1a951a93d vs head 5b679619d. Functional: NO_REGRESSION, 1 visual change(s), 0 text-only change(s). Only steps whose screenshots differ are shown.

Chat: + > More > Attach from Library: Current-head captures from separate local installs with the same draft. The entry appears only inside More. Paired Studio/Desktop staging is green on Linux, macOS and Windows.
Chat: + > More > Attach from Library

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
@danielhanchen
danielhanchen marked this pull request as ready for review November 3, 2026 07:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T09:49:05.592199Z 5b67961 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 3, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 4, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 5b679619dc

ℹ️ 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".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 4, 2026
@danielhanchen
danielhanchen merged commit 220719e into main Nov 4, 2026
@danielhanchen
danielhanchen deleted the fix/library-chat-file-picker branch November 4, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Upload files from unsloth studio library

1 participant