Skip to content

UI refresh: dark mode, mockup alignment and in-app tabs#20

Merged
knep merged 8 commits into
masterfrom
feat/ui-refresh
Jun 19, 2026
Merged

UI refresh: dark mode, mockup alignment and in-app tabs#20
knep merged 8 commits into
masterfrom
feat/ui-refresh

Conversation

@knep

@knep knep commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

A visual refresh of the main app plus two new capabilities: a dark theme and in-app tabs for keeping several scripts open at once. Also fixes a production-breaking bug found along the way.

Changes

Critical fix

  • FaviconManager still used Vuex (this.$store.state.executions…) after the Pinia migration, which threw on mount and left the whole main app blank. Switched to useExecutionsStore().

Dark mode

  • Light/dark toggle in the sidebar, admin header and login page; persists in localStorage, otherwise follows the OS prefers-color-scheme.
  • Vuetify theme injected into the shared theme helper via registerVuetifyTheme() so the Vuetify-less login page reuses the same preference without bundling Vuetify (login chunk stays ~3 kB).
  • Toggle uses brightness_2 / brightness_7light_mode/dark_mode don't exist in the bundled legacy material-design-icons font (they rendered as literal text).

Main-app refresh (aligned with the proposed mockup)

  • Sidebar: server badge + persistent full-width search field, folder groups as labelled sections, smaller script names.
  • Execution view: play icon on Execute, GitHub-style dark console with an "Output" header.
  • Modern system-UI font stack (--font-sans / --font-mono).

In-app tabs

  • Persistent tab bar; opening scripts adds tabs you can switch between without leaving the app.
  • Each tab preserves its entered parameter values (restored via the existing reloadModel path; consumeValues is one-shot to avoid looping on the parameter echo).
  • Running executions stay alive across tab switches (already backed by the executions.executors map). Open tabs persisted to localStorage.

Testing

  • npm run test:unit-ci984 passed (incl. +16 for the new scriptTabs store; MainAppSidebar test updated for the new markup).
  • Verified live in the browser: light/dark + toggle persistence, tab open/switch/close, per-tab value preservation, localStorage persistence across reload.

🤖 Generated with Claude Code

Thomas Kpenou and others added 8 commits June 18, 2026 17:38
FaviconManager still used the Vuex API (this.$store.state...) after the
Pinia migration, so this.$store was undefined and the thrown error broke
the entire main-app mount. Switch it to useExecutionsStore(). This is the
only remaining Vuex reference in the codebase.

UI refresh (increment 1):
- Replace the rainbow image banner behind the script header with a clean
  surface (--script-header-background -> background color).
- Execute/Stop buttons: drop the full-width flex stretch; compact,
  left-aligned with a gap, schedule button pushed right.
- Welcome panel: clearer type hierarchy and constrained logo.
- Sidebar: remove the underline on the server-name link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a light/dark theme toggle to the main app, echoing the mockup palette
(teal accent preserved on dark surfaces).

- vuetifyPlugin: new scriptServerDark Vuetify theme.
- shared.css: dark overrides for the custom CSS variables, toggled by a
  `theme-dark` class on <html>.
- common/utils/theme.js: keeps the html class and Vuetify theme in sync,
  persists the choice in localStorage, falls back to prefers-color-scheme.
- ThemeToggle component in the sidebar header.

Verified in the browser: light/dark render, toggle, and persistence all work.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Inject the Vuetify theme into common/utils/theme.js via registerVuetifyTheme()
instead of importing it statically, so the Vuetify-less login page can reuse the
same preference logic without bundling Vuetify (login chunk stays ~3 kB).

- admin: registers the theme, calls initTheme(), adds a white ThemeToggle to the
  header (ThemeToggle now takes a `color` prop).
- login: applies the persisted/OS-preferred theme on load and adds a small
  floating emoji toggle (no Material Icons font on this page).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
light_mode/dark_mode are absent from the legacy material-design-icons font, so
the toggle rendered the literal ligature text instead of an icon. Swap to
brightness_7 (sun) / brightness_2 (moon), which are present in the font.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sidebar:
- two-row header: server badge + title, then a persistent full-width search
  field underneath (replaces the collapsible search icon)
- folder grouping restyled as uppercase section labels with a folder icon
- leading chevron icon per script; active item highlighted in the teal accent

Execution view:
- play_arrow icon on the Execute button
- log output restyled as a GitHub-dark console with an "Output" header bar

Typography: introduce --font-sans / --font-mono (modern system stack) applied
app-wide; the terminal uses the mono stack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the leading chevron icon, and render script names smaller (0.82rem) with
the system sans stack for a lighter, cleaner list under each folder group.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a persistent tab bar so several scripts can be kept open and switched
between without leaving the app.

- scriptTabs store: tracks open tabs (persisted to localStorage) and snapshots
  each tab's parameter form values
- ScriptTabs component: tab bar above the content, with per-tab close; closing
  the active tab activates the neighbour
- index.js: open a tab on navigation, snapshot the leaving tab's values, and
  restore the entered tab's values via the existing reloadModel path
  (consumeValues is one-shot to avoid looping on the parameter echo)

Concurrent executions already persist per script (executions.executors map), so
switching tabs keeps running scripts and their output intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also gitignore the local .claude/ tooling directory (machine-local settings and
dev launch configs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@knep knep merged commit 9e97428 into master Jun 19, 2026
7 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 56.12245% with 43 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
web-src/src/common/utils/theme.js 15.00% 17 Missing ⚠️
...src/src/main-app/components/scripts/ScriptTabs.vue 0.00% 17 Missing ⚠️
web-src/src/common/components/ThemeToggle.vue 42.85% 2 Missing and 2 partials ⚠️
web-src/src/main-app/MainApp.vue 0.00% 3 Missing ⚠️
web-src/src/main-app/components/FaviconManager.vue 0.00% 1 Missing ⚠️
web-src/src/main-app/components/MainAppSidebar.vue 90.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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