Skip to content

feat(ai-studio): dock execution log beside the properties panel - #64

Merged
librowski merged 10 commits into
mainfrom
ai-studio-ux-improvements-2
Jul 15, 2026
Merged

feat(ai-studio): dock execution log beside the properties panel#64
librowski merged 10 commits into
mainfrom
ai-studio-ux-improvements-2

Conversation

@librowski

@librowski librowski commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Execution Log placement

  • The log is no longer a centered overlay covering the canvas. It floats bottom-right, hugging the left edge of the properties panel when the panel is expanded, and the viewport edge when it is not. Position reacts to the panel via a ResizeObserver-based hook (useRightPanelAnchor).
  • Height grows with entries from a single header up to a 430px cap (no fixed initial height).
  • Auto-scroll follows the newest entry; scrolling away pauses it, returning to the bottom resumes it.
  • Collapse state persists per browser session; starting a new execution reopens a collapsed log.

Log entry interaction

  • The whole entry (header + detail box) is now one collapse/expand toggle. Previously the detail box showed a pointer cursor but ignored clicks.
  • Selecting text inside an entry does not trigger the toggle, so log output stays copyable.
  • Clicks on links/buttons inside the detail do not propagate to the toggle.

Welcome reopen button

  • The floating info button shared the bottom-right corner with the new log position and already overlapped the expanded properties panel footer. It now hides while the log is visible or the panel is expanded.

Verification

Exercised in the browser against a simulated execution stream: anchor behavior in both panel states, growth to the 430px cap, auto-scroll pause/resume, session persistence of the collapse state, auto-open on execution start, whole-entry toggling, and the text-selection guard. pnpm lint, pnpm typecheck (ai-studio), pnpm format, and pnpm test are green. The apps/docs typecheck failure (astro check / Starlight sidebar types) is pre-existing and unrelated.

The log is no longer a centered overlay covering the canvas. It floats
bottom-right: against the left edge of the properties panel when the
panel is expanded, at the viewport edge otherwise.

- height grows with entries up to 430px instead of a fixed 60vh
- auto-scroll follows the newest entry; manual scroll pauses it,
  returning to the bottom resumes it
- collapse state persists in sessionStorage for the session
- starting an execution reopens a collapsed log
The gray detail box showed a pointer cursor but ignored clicks; only
the entry header toggled. Now the entire entry (header + detail) is
one toggle area.

- text selection inside the entry does not trigger the toggle, so log
  content stays copyable
- clicks on interactive elements (links, buttons) inside the detail do
  not propagate to the toggle
The floating info button shares the bottom-right corner with the
execution log and overlapped the expanded properties panel footer.
Hide it while the log is on screen or the properties panel is
expanded; it returns once the corner is free.
- full-word selector params (state, not s) across touched files
- named constants for magic numbers: scroll bottom tolerance, detail
  preview length, node id preview length, expanded-panel height ratio
- anchor hook decomposed into findRightPanel / measureAnchor /
  observeAnchor / sameAnchor instead of one closure with an alias
- toggleLog reuses setLogCollapsed instead of a side effect inside the
  setState updater; persist helper renamed to persistLogCollapsed
- clsx for conditional class lists instead of template strings
- dropped a dead styles lookup (event--<type> classes do not exist)
Clicking the detail box collapsed the entry under the cursor, which
fought with reading and copying the content. The toggle now lives on
the header row alone and the detail is plain selectable text without
a pointer affordance.

Refines the toggle behavior after hands-on testing; diverges from the ticket's
whole-entry-toggle wording, ticket to be updated.
Reverts the header-only constraint - the ticket spec is correct as
written: header and detail box form one toggle area, with text
selection and interactive elements guarded.
@librowski
librowski force-pushed the ai-studio-ux-improvements-2 branch from 7bf1ab8 to 88babe8 Compare July 14, 2026 10:38
Comment thread apps/ai-studio/src/components/disclaimer/disclaimer-modal.tsx Outdated
Comment thread apps/ai-studio/src/stores/use-execution-store.ts Outdated
- persist the log collapse state via zustand persist middleware with
  partialize and sessionStorage instead of hand-rolled helpers;
  resetExecution keeps the current value through the updater
- is-prefix for boolean variables: isLogCollapsed, isPanelExpanded,
  isLogVisible, isOpen, isExpanded, isHighlighted, isCollapsed
@librowski
librowski merged commit baa0951 into main Jul 15, 2026
2 checks passed
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.

4 participants