Skip to content

Studio: open Audio from More and keep it in the sidebar while it is open - #12807

Merged
mahiatlinux merged 2 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-sidebar-pin
Oct 6, 2026
Merged

mahiatlinux merged 2 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-sidebar-pin

Conversation

@Etherll

@Etherll Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Audio is unpinned by default, so it lives in the sidebar's More flyout. Clicking the Audio row there only opened its workflow submenu, and on /audio the sidebar had no Audio row, so the workflow list (Speak, Clone, Edit, Convert, Music, Separate, Transcribe) was hidden.

Now a click or tap on Audio in More goes to /audio and closes the flyout. It uses the same navigation as an inline Audio row, so the page opens on the session's current workflow (Speak on a fresh session). Hovering Audio still opens the submenu, and Enter, Space and ArrowRight still open it without navigating.

While an Audio page is open, the Audio row shows in the sidebar in its normal slot (between Images and Train by default) with its workflow list, and it is removed from More. Leaving Audio puts it back in More. This is not saved as a pin: Settings > Customize sidebar still shows Audio unpinned.

Changes

  • nav-row-state.ts has a new pure placeNavRows(rows, shown) that splits rows between the sidebar and More. It keeps the existing rule that More is dropped when only one row is unpinned. The count is taken before the shown row leaves, so surfacing Audio never drops More and the one row still in it.
  • app-sidebar.tsx calls placeNavRows with "audio" when the Audio route is active, replacing the two inline filters. AudioMoreSubmenu gets an onOpen prop. Its SubTrigger onClick calls event.preventDefault() so Radix does not open the submenu, then closes More and runs the row's onClick.

Touch users lose the one-tap path from More to a workflow other than the current one. They now open Audio and pick the workflow from the sidebar row.

Testing

Added tests/sidebar-nav-placement.test.ts with behavioral tests for placeNavRows, extended the More submenu test in tests/audio-sidebar-workflows.test.ts, and updated a source regex in tests/sidebar-projects-nav-auto.test.ts.

cd studio/frontend
node --experimental-strip-types --test tests/sidebar-nav-placement.test.ts tests/audio-sidebar-workflows.test.ts tests/sidebar-projects-nav-auto.test.ts tests/sidebar-spinner-column.test.ts tests/shortcut-dispatch-guards.test.ts
npm test
npm run typecheck
npm run i18n:check
  • Focused tests: 66 pass, 0 fail.
  • npm test: 10583 pass, 2 fail (color-themes flavor accents and find-in-page light mode background). Both fail the same way on the untouched base 7ccf3fcb2.
  • typecheck and i18n:check pass. ESLint's 8 errors in app-sidebar.tsx are all on lines this change does not touch.

Manual run with Playwright against Studio built from this branch (CPU only, no models loaded), light and dark:

  • Hovering Audio in More opens the submenu.
  • Clicking Audio in More goes to /audio and closes the flyout. The sidebar shows hub, library, images, audio, train, with Speak highlighted, and More no longer lists Audio.
  • Going back to Hub removes the Audio row and More lists Audio again. Returning through More keeps a previously picked workflow (Clone).
  • Keyboard: Enter, Space and ArrowRight on Audio in More each open the submenu with focus on Speak, and the URL does not change.
  • Collapsed icon rail on /audio shows the Audio icon inline and active.
  • Mobile (390px): tapping Audio in More navigates and closes the sheet. Reopening the sheet shows Audio inline with its workflows.
  • Settings > Customize sidebar on /audio still shows Audio unpinned.

@Etherll
Etherll requested a review from danielhanchen as a code owner October 6, 2026 02:25
@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Clicking Audio in the sidebar's More menu now opens the Audio page and closes the menu. Before, it only opened the workflow submenu. The page opens on the current workflow, which is Speak in a fresh session. While any Audio page is open, Audio sits in the sidebar in its usual slot with its workflow list, and it goes back into More when you leave. Nothing is saved, and Customize sidebar still shows Audio unpinned.

Checked with two Studio builds, merge base 7ccf3fcb and 64ca0a69. On the base, the click left the page unchanged and opened the submenu. On the head, it opened /audio in Chromium, Google Chrome, Microsoft Edge and Firefox 157. Enter, Space and ArrowRight on Audio still open the submenu without navigating. A real pin from Customize sidebar behaves as before, and the surfaced row is never written to account settings. It also works in the phone sheet and the collapsed rail. Focused frontend tests pass (66/66). Safari and macOS were not run.

One cosmetic edge case is left. If the click lands within about 100 ms of first hovering Audio, the submenu can flash for about 60 ms while More closes (1 of 12 tries). Navigation is unaffected.

Upstream CI is still running. Codex review requested at 02:27 UTC, no response yet.

More > Audio before and after

Clicking Audio in More: before (7ccf3fcb) and after (64ca0a69).

@mahiatlinux

Copy link
Copy Markdown
Contributor

Verified the Audio sidebar behavior at source head aff309f400c184702a5891094f3138a32e3544fd and prospective merge head 58280747e179b0c2a3998de582a39a9d1663c753 against merge base 7ccf3fcb2aef4601e54f18cbe893915ec6a9173b.

The functional patch is sound. Radix Menu 2.1.16 checks event.defaultPrevented before its click handler opens a submenu, while its Enter, Space, and ArrowRight behavior is handled separately. The implementation therefore routes a pointer click to /audio without changing keyboard or hover submenu behavior. Review added no functional fix. The only follow-up commit trims comments in PR scope; the comment-only gate proves unchanged TypeScript printer output.

Executed checks:

  • A/B placement reproducer: node --experimental-strip-types placement-ab.mjs <nav-row-state.ts> fails at the merge base because placeNavRows is absent, then passes at the source head and prospective merge.
  • Exhaustive placement check: node --experimental-strip-types placement-exhaustive.mjs <nav-row-state.ts> passes all 11,264 pin/surfacing combinations at the prospective merge.
  • Focused changed tests: node --experimental-strip-types --test tests/audio-sidebar-workflows.test.ts tests/sidebar-nav-placement.test.ts tests/sidebar-projects-nav-auto.test.ts passes 22/22 after the comment cleanup.
  • Frontend typecheck and i18n validation pass on both merge base and prospective merge.
  • Full npm test is base-equivalent: prospective merge passes 10,584/10,586 and has the same two unrelated failures as the merge base (color-themes.test.ts neon-cyberpunk light seeds and find-in-page.test.ts box-shadow parsing).
  • Changed test files pass ESLint. check_comment_only.py passes all three cleaned files. Prettier still reports the same pre-existing formatting drift in sidebar-projects-nav-auto.test.ts; the cleanup does not add printer-visible code changes.

UI evidence used an isolated local Studio install on Linux 7.0.0 x86_64, Node 26.8.2, Python 3.11.15, Playwright 1.62.0, and Google Chrome for Testing 151.0.7922.34. pr_ui_diff.py --pr 12807 --base-ref 7ccf3fcb2aef4601e54f18cbe893915ec6a9173b --head-ref f5508ab101d10c486ffcf8c42ff5de14764662e9 compared the actual merge base with the prospective merge before the comment-only commit. The executable TypeScript is identical at the final repaired heads.

Observed on desktop and a 390 x 844 touch viewport:

  • Before: clicking unpinned Audio keeps /chat open and shows the seven-workflow submenu under More.
  • After: the same pointer action opens /audio, closes More, surfaces Audio inline, and shows Speak, Clone, Edit, Convert, Music, Separate, and Transcribe.
  • On both sides, hover plus Enter, Space, and ArrowRight keep /chat open and focus Speak in the submenu. The appearance customization storage value is unchanged.

Desktop before/after:

Desktop Audio navigation before and after

Mobile before/after:

Mobile Audio navigation before and after

Structured UI facts

@mahiatlinux mahiatlinux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Ready to merge, all manually checked.

@mahiatlinux
mahiatlinux merged commit 5472cfa into unslothai:main Oct 6, 2026
iam-knoit added a commit to SynhalaAI/unsloth that referenced this pull request Oct 6, 2026
…nslothai#12807)

# Conflicts:
#	studio/backend/storage/credential_secrets.py
#	studio/backend/storage/mcp_servers_db.py
#	studio/backend/storage/providers_db.py
#	studio/backend/storage/studio_db.py
#	studio/frontend/tests/training-validation.test.ts
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.

3 participants