Skip to content

Studio: Downloads button in the browser panel - #13009

Merged
shimmyshimmer merged 14 commits into
mainfrom
studio-browser-downloads-button
Oct 8, 2026
Merged

shimmyshimmer merged 14 commits into
mainfrom
studio-browser-downloads-button

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The browser panel now has a Downloads button in the toolbar, like a regular browser. It shows a download while it runs, tells you when it finishes, and lists your recent downloads.

What changes

  • Downloads button: replaces the old "download this page" button. It shows an animated ring while any download is running. Saving the current page moved to the panel menu as Save page as….
  • Completion notice: when a download finishes, a popover opens from the button with "Download complete" (or "Download failed"), the file name, and Open / Show in folder. It closes by itself after a few seconds unless hovered. The toast is only used when the button isn't on screen (including a panel kept mounted while you're off the chat page), so there's no double notification. If a newer result replaces a failed or unrecorded one that the list can't show, the older one is toasted rather than lost.
  • Recent downloads: clicking the button lists running downloads and the 8 most recent ones with status, size and time, plus Show all to open the full Downloads page. Each row has a folder button (desktop app) and a ⋯ menu: Open, Show in folder, Copy download link, Remove from history. Files that were moved or deleted are marked as such.
  • Open: in the desktop app, Open launches the saved file with its default app through a new browser_download_open command. Programs and scripts are refused and stay a "Show in folder" away (the button and list don't offer Open for them); the check reuses dangerous-file-types.json, the same list the download approval uses, and folds case as Windows does (so .mſi counts as .msi). On the web, Open shows this session's copy in a tab, or falls back to the file's page.
  • Works for both panel saves (downloads.ts) and native webview downloads (native-view.ts). A site download starts the ring once it's approved, before the answer reaches the app, since a file that finished downloading while the prompt was open lands right away. A new downloadCancelled event stops the ring when an approved download's save dialog is cancelled, since that case sent nothing before. Done, failed and cancelled events now carry the prompt's id, so two downloads of the same address end separately. The "couldn't mark as downloaded" warning still shows as before.
  • Download prompt: files that run code (.exe, .dmg, .AppImage, scripts) always ask, whatever was remembered for the site, so their prompt no longer offers "Remember for next time". Ticking it did nothing for those files and the prompt came back every time.
  • History links: long names are bounded keeping their extension, so .exe stays visible and recognised. recordDownload now returns the new row's id (undefined when download history is off), so a result links to its row even when the name was shortened. With history off, the app forgets the native id, so the notice drops Open from disk and Show in folder instead of offering actions that fail.
  • Memory: a kept copy with no history row is only held while a notice on screen can reach it, and released once that notice closes or is replaced. A copy kept for a history row goes when the row is removed or cleared.
  • File tabs: file, video and floating-file tabs keep their own save button. The Downloads button stays registered there with its icon hidden while idle, and shows while a download runs or its result is up, so the ring and notice don't disappear when you switch to one. The list or notice closes when the panel goes off screen.
  • Downloads page: Open now opens the saved file there too, through the same download-open.ts the button uses.
  • Recent list: files are rechecked on window focus and after Open or Show in folder fails, as on the Downloads page.
  • formatSize and revealLabelKey moved from internal-pages.tsx into download-format.ts so the button and the Downloads page share them.

Testing

  • npm run typecheck
  • npm test (all browser and download tests pass), including a test that the prompt hides Remember for files that run code, history id and result release tests, and new native view tests: an approved download runs on the button until it lands or its save is cancelled, one that finished while its prompt was open doesn't keep spinning, two downloads of one address end separately, and with a button on screen a finished download shows there instead of as a toast (the unmarked warning still toasts)
  • cargo test browser_ (36 pass), including a new test that programs and scripts are never opened (long s included)
  • eslint on the changed files: no new findings
  • In Studio on the web: downloaded files from the browser panel and checked the ring, the completion popover, the recent list, Open, Copy download link, Remove from history and Save page as…

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-10-08T08:32:18.514623Z 3325213 Manual request
🔒 Security Review ✅ Completed 2026-10-08T03:49:29.791392Z c704924 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f137ee171c

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

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: c704924bc6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

- Fold extensions as Windows does before opening a download (long s in .msi)
- Link finished downloads to their history row by id, not by name
- Drop the native id of an unrecorded download, which the app forgets
- Keep a saved blob only when no saved file can be opened instead
- Show unrecorded results even while the list is open
- Restart the notice countdown after the pointer leaves
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acbfa590f0

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

…is open

- Carry the prompt id through download done, failed and cancelled events, so two
  downloads of one address end apart
- Recheck the recent list on window focus and after Open or Show in folder fails
- Key the existence check by ids, so it no longer reruns on every render
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fee91f1c41

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

…creen

- Drop an unrecorded result's kept bytes once its notice closes or is replaced
- Dismiss the result when the notice times out, not only on close
- Toast a failed or unrecorded result that a newer one replaces on the button
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04682db182

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

…files

- A panel kept mounted off screen no longer counts as a Downloads button, so
  results there toast instead of popping a hidden notice
- Keep an unrecorded copy only when a notice on screen can reach it
- Offer Show in folder, not Open, for desktop downloads that run code
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

…ads-button

# Conflicts:
#	studio/frontend/tests/browser-settings.test.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96f65bb4ad

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

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcb6ffc6df

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

- Show the Downloads button on file, video and floating-file tabs while a download
  runs or its result is up, and carry an open notice across tab changes
- Hold a result only while a button shows it; with none, the caller's toast is it
- Open the saved file from the Downloads page too (shared download-open.ts)
- Drop a kept copy when its history row is removed or cleared
- Keep the extension when bounding a long download name, so .exe stays visible
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 693c86c61b

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

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0df915ecd8

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

…n hidden

- File toolbars keep the Downloads button mounted and only hide its glyph while
  idle, so a save that finishes at once still shows its notice
- Close the list or notice when the panel goes off screen
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 3325213c76

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

@shimmyshimmer
shimmyshimmer merged commit 0ff8067 into main Oct 8, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-browser-downloads-button branch October 8, 2026 08:36
danielhanchen added a commit that referenced this pull request Oct 10, 2026
…very locale (#13169)

#13009 (Downloads button in the browser panel) and #13007 (video
attachments in the browser panel) added browser.downloads.* and
browser.video.* to en only, so npm run i18n:check:strict, the Locale parity
step of Frontend CI, has failed on main with 33 missing keys in all 13
overlays. Add the 12 downloads and 21 video strings to each locale beside
browser.device, with the {name} placeholder kept in openFailed.
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.

2 participants