Skip to content

studio: fix show in folder over settings and open the logs directory - #11667

Merged
Etherll merged 4 commits into
unslothai:mainfrom
mahiatlinux:fix/studio-logs-folder-reveal
Sep 23, 2026
Merged

Etherll merged 4 commits into
unslothai:mainfrom
mahiatlinux:fix/studio-logs-folder-reveal

Conversation

@mahiatlinux

Copy link
Copy Markdown
Contributor

Two fixes for Settings > Logs on desktop.

Show in folder over Settings

The "Show in folder" action on the Download all logs toast could not be clicked. A modal Radix dialog sets pointer-events: none on body, and sonner never re-enables pointer events on its toasts. The click fell through to the dialog overlay, the action never ran, and Settings closed. The same applies to any toast action or close button shown over a dialog.

  • components/ui/sonner.tsx: toasts get pointer-events-auto. Sonner's unlayered [data-visible=false] rule still wins, so hidden toasts stay inert.
  • components/ui/dialog.tsx: DialogContent composes onInteractOutside and prevents dismissal when the target is inside [data-sonner-toaster]. A caller's own handler still runs first.

Open logs folder target

The button opened the selected log's parent. With a server log selected it landed in ~/.unsloth/studio/logs/server instead of ~/.unsloth/studio/logs.

  • routes/settings.py: GET /api/settings/debug/logs/sources reports log_root as <studio home>/logs instead of the studio home.
  • features/settings/api/debug-logs.ts: openLogsFolder(logRoot) opens that directory and no longer derives one from the selected log's realpath.
  • src-tauri/src/commands.rs: the open_logs_dir fallback opens diagnostics::logs_dir() instead of ~/.unsloth/studio.

Checks

  • Chromium probe with the real DialogContent and Toaster, dialog open, toast with an action. Before: the click hit dialog-overlay, the action did not fire, the dialog closed. After: the click hit the action button, it fired once, the dialog stayed open. With only the sonner change the action fired but the dialog still closed.
  • node --test on debug-log-export, dialog-toast-outside, cache-rows-model-folder, titlebar-modal-layering, account-settings-ui: 37 passed. The new dialog test and the updated openLogsFolder test fail on the old code.
  • pytest tests/test_debug_log_routes.py tests/test_debug_log_sources.py: 52 passed. The new log_root assertion fails on the old code.
  • tsc -b, tsc -p tsconfig.test.json, ruff check: clean.
  • Not run: Rust build and tests (no cargo on the test machine), and the packaged desktop app.

@mahiatlinux

Copy link
Copy Markdown
Contributor Author
image

@Etherll

Etherll commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

UI evidence for PR #11667

Base c78f51c5549ae799cf4d3c95ebb9630420ef6e5a; head 035f6113a8d8dd2dc603c44f61cf7d431485c366.

With the same intercepted password-change response (401, Current password is incorrect), clicking the visible toast location gave these results:

Before After
Toast pointer events none auto
Click hit toaster No Yes
Change password dialog remained open No Yes

The toast stayed visible and one change request was sent in each run. Tested in Windows Headless Chrome 131 at 1200×800. This scene covers the toast/dialog interaction; it did not exercise the native Open logs folder destination.

pr11667_before_after

@Etherll
Etherll merged commit 875f8f4 into unslothai:main Sep 23, 2026
16 of 58 checks passed
@mahiatlinux
mahiatlinux deleted the fix/studio-logs-folder-reveal branch September 25, 2026 05:31
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…nslothai#11667)

* studio: keep toast actions clickable over modal dialogs

* studio: open the logs directory from the logs tab

* Fix Studio logs folder fallback and sheet toast interaction

* Fix logs folder reveal before log directory exists

---------

Co-authored-by: mahiatlinux <[email protected]>
Co-authored-by: Etherll <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants