Skip to content

Redesign desktop UI/UX with sidebar shell and guided run flow#13

Merged
inhaq merged 2 commits into
mainfrom
ui/desktop-redesign
Jun 14, 2026
Merged

Redesign desktop UI/UX with sidebar shell and guided run flow#13
inhaq merged 2 commits into
mainfrom
ui/desktop-redesign

Conversation

@inhaq

@inhaq inhaq commented Jun 14, 2026

Copy link
Copy Markdown
Owner

This pull request was created by @kiro-agent on behalf of @inhaq 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web


Summary

A significant UI/UX overhaul of the Loopwright desktop app to feel like a polished, modern desktop application and to make it obvious what the app does and how to use it.

  • App shell: replaced the top bar with a left sidebar — branded logo mark, icon navigation, and an engine-status pill at the bottom.
  • Design system (styles.css): refined dark palette, consistent spacing/radius scale, polished inputs/selects/iOS-style switches, buttons, status badges, cards, empty/loading states, custom scrollbars, and a responsive layout that collapses to a top bar on narrow widths.
  • New Run view: now explains the actor–critic loop up front (3 "how it works" steps), adds clickable example goal chips, model-provider presets (OpenAI / Anthropic / Local / split actor+critic), autocompleted actor/critic runner ids, and friendly toggle + stepper controls. The raw runner-profile JSON is tucked behind an Advanced disclosure so newcomers aren't faced with JSON immediately.
  • Monitor / Results / Sessions / Secrets: consistent page headers, animated status pills, result count tiles, clearer copy, empty states, and a back button on results.

No engine/API changes — this is purely the Tauri/browser frontend. All existing behaviour (live SSE stream, cancel, restart-with-confirm, secret validation) is preserved.

Testing

  • npm run build (tsc --noEmit && vite build) passes cleanly.

Notes / limitations

  • Provider presets are starting points; users still supply API keys via the Secrets keychain (referenced by apiKeyEnv).
  • Visual review is best done by running the desktop app or npm run preview.

Summary by CodeRabbit

  • New Features
    • Navigation moved to a left sidebar with iconized tabs and updated active states.
    • Start form upgraded with presets, example goals, advanced JSON editor, and runner selectors.
    • Live run monitor refresh with improved phase/status display and a results link when complete.
    • Results, sessions, and secrets pages rebuilt with clearer loading/empty/error states.
  • Bug Fixes
    • Improved stop/cancel handling and consistent failure reporting.
  • Style
    • Full dark redesign with updated app shell, cards, controls, and improved responsiveness.

- Replace top-bar with an app sidebar (branded logo, icon nav, engine
  status pill) for a modern desktop-app layout.
- Add a full design system in styles.css: refined dark palette, spacing
  and radius scale, polished inputs/selects/switches, buttons, badges,
  cards, empty/loading states, and responsive behaviour.
- Rework the New Run view to explain the actor-critic loop (how-it-works
  steps), add example goal chips, model-provider presets, autocompleted
  actor/critic runner ids, and toggle/stepper controls behind a friendly
  Advanced JSON editor.
- Refresh Monitor, Results, Sessions and Secrets views with page headers,
  status pills, count tiles, empty states and clearer copy.

Co-authored-by: Inzimam Ul Haq <27832433+inhaq@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 136bda0d-41c5-43be-846d-867c395f92da

📥 Commits

Reviewing files that changed from the base of the PR and between 38c92e6 and 930ab53.

📒 Files selected for processing (2)
  • desktop/index.html
  • desktop/src/main.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • desktop/index.html
  • desktop/src/main.ts

📝 Walkthrough

Walkthrough

The desktop app is redesigned from a topbar layout to a sidebar app shell. index.html gains an aside.sidebar with icon-labeled nav items and an engine-status footer. main.ts is refactored to use DOM helper functions and inline SVG icons, with all views (Start, Monitor, Results, Sessions, Secrets) rebuilt. styles.css is replaced with a full dark design system.

Changes

Desktop UI redesign

Layer / File(s) Summary
App shell structure and design system
desktop/index.html, desktop/src/main.ts, desktop/src/styles.css
index.html replaces the topbar with aside.sidebar (branded nav items + engine-status footer). CSS introduces a complete :root palette, global base styles, and a two-column #app grid with sidebar and scrollable content area. main.ts wires engineLabel to the new sidebar DOM node and sets it to "engine connected" or "engine offline".
DOM helpers, nav wiring and Start view plus form styles
desktop/src/main.ts, desktop/src/styles.css
h() gains innerHTML support; icon() and ICONS are added. Nav tab switching uses clearNavActive() with .nav-item.active. Start view gains goal chips, preset selector, advanced JSON editor, actor/critic datalist, and a validated submit handler that disables the button and calls startRun. CSS adds page/card scaffolding, step cards, form primitives, toggles, steppers, and button/hint variants.
Monitor view rebuild
desktop/src/main.ts, desktop/src/styles.css
Monitor view switches from HTML string composition to DOM node construction for header/usage/tasks/log. Usage token counts use locale formatting and plan text is updated from plan_reviewed. Phase rendering uses explicit className/text for integration-failure, needs-human, done (adds "View results" button), and error states. CSS adds animated phase pills, run-header/session pill, task badges, count pills, and engine log styling.
Results view rebuild
desktop/src/main.ts
renderResults is rewritten with DOM construction: loading page, failure page on getTrace error, page header with back button and count badges, "Run failed" and "Integration & verification" cards from event log data with "Failed — …" wording, usage tables, tasks list, and raw trace section.
Sessions and Secrets views plus responsive styles
desktop/src/main.ts, desktop/src/styles.css
Sessions view gains loading/empty states and a session list wired to renderResults via stateForStatus(). Secrets view adds a desktop-only guard, secrets list with delete buttons, "Add a key" form card, and a restart confirmation UI with a ghost-styled "Keep runs going" button. CSS adds list item styles, secret form grid, empty-state layout, loading spinner, and a 720 px single-column breakpoint.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 Hoppity-hop, the topbar's gone,
A sidebar now where nav lives on!
With icons bright and DOM nodes built,
No template strings — just structured gilt.
The dark theme shines, the phases pulse,
A rabbit's work: from start to results! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.58% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Redesign desktop UI/UX with sidebar shell and guided run flow' accurately describes the primary changes in the pull request, which involve replacing the top navigation with a left sidebar and redesigning the run flow interface.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui/desktop-redesign

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@desktop/src/main.ts`:
- Around line 765-779: The refresh function is not handling errors from
listSecretKeys() and deleteSecret() calls, causing unhandled rejections instead
of displaying errors to the user. Wrap the await listSecretKeys() call in a
try-catch block to catch load errors and surface them via formError, similar to
how renderSessions() handles errors. Additionally, wrap the await
deleteSecret(k) and await refresh() calls in the delete button's click event
listener in a try-catch block to catch deletion errors and also surface them via
formError rather than letting the promise rejection propagate.
- Around line 181-239: The form controls goalArea, presetSelect, the runners
textarea, maxParallel, and the switch elements lack proper label associations,
making them inaccessible to assistive technology. Replace the adjacent text node
labels (currently wrapped in divs with class "label") with proper HTML label
elements that use the for attribute, and add corresponding id attributes to each
form control. For example, the h("div", { class: "label" }, ["Goal"]) should
become h("label", { for: "goal-input" }, ["Goal"]), and the goalArea textarea
should have an id="goal-input" attribute added. Apply this same pattern to all
other mentioned controls (presetSelect, runners textarea, maxParallel, and both
switches) throughout the form, ensuring each control has a unique id and a
corresponding label element with a matching for attribute.

In `@desktop/src/styles.css`:
- Around line 614-626: The `.nav-item span { display: none; }` rule in the
mobile breakpoint completely removes navigation labels from the accessibility
tree, making buttons inaccessible to screen readers and voice control users.
Replace the `display: none` approach with a technique that visually hides the
text while keeping it accessible, such as using a visually-hidden class with
clip-based hiding (position: absolute, clip: rect, overflow: hidden), or
alternatively add explicit `aria-label` attributes to the corresponding nav
buttons in desktop/index.html to provide accessible labels for screen readers.
- Around line 51-52: The CSS custom properties --mono and --sans use unquoted
font-family identifiers that violate the value-keyword-case Stylelint rule.
Quote all unquoted font family names (such as ui-monospace, Menlo, Consolas,
-apple-system, BlinkMacSystemFont, Roboto, Inter, and system-ui) while leaving
generic keywords like monospace and sans-serif unquoted. Apply this same quoting
convention to the other font-family declarations that are flagged by the linter
at the other affected locations in the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50bb419c-321a-419f-8ba3-f9afe459df13

📥 Commits

Reviewing files that changed from the base of the PR and between 0ba295f and 38c92e6.

📒 Files selected for processing (3)
  • desktop/index.html
  • desktop/src/main.ts
  • desktop/src/styles.css

Comment thread desktop/src/main.ts
Comment thread desktop/src/main.ts
Comment thread desktop/src/styles.css
Comment on lines +51 to +52
--mono: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

These values will trip the current Stylelint rule.

The browser will accept them, but the current value-keyword-case check is already flagging these declarations. Quoting the font-family identifiers and lowercasing the keyword values will keep this stylesheet lint-clean.

Also applies to: 67-67, 439-439

🧰 Tools
🪛 Stylelint (17.12.0)

[error] 52-52: Expected "BlinkMacSystemFont" to be "blinkmacsystemfont" (value-keyword-case)

(value-keyword-case)


[error] 52-52: Expected "Roboto" to be "roboto" (value-keyword-case)

(value-keyword-case)


[error] 52-52: Expected "Inter" to be "inter" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@desktop/src/styles.css` around lines 51 - 52, The CSS custom properties
--mono and --sans use unquoted font-family identifiers that violate the
value-keyword-case Stylelint rule. Quote all unquoted font family names (such as
ui-monospace, Menlo, Consolas, -apple-system, BlinkMacSystemFont, Roboto, Inter,
and system-ui) while leaving generic keywords like monospace and sans-serif
unquoted. Apply this same quoting convention to the other font-family
declarations that are flagged by the linter at the other affected locations in
the file.

Source: Linters/SAST tools

Comment thread desktop/src/styles.css
@inhaq inhaq merged commit b47952d into main Jun 14, 2026
8 checks passed
@inhaq inhaq deleted the ui/desktop-redesign branch June 14, 2026 10:38
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.

1 participant