Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
54bb77b
fix: bound desktop background resources
ShpetimA Aug 29, 2026
3aeea8d
feat(design-system): foundations, canonical components, and workspace…
ShpetimA Sep 20, 2026
a641364
feat(workspaces): preserve tab context and reconcile workspace lifecycle
ShpetimA Sep 21, 2026
0ca1b45
feat(workspaces): open persistent PR tabs with contextual navigation
ShpetimA Sep 21, 2026
f1789c5
feat(workspaces): finish shell navigation, viewport memory and keyboa…
ShpetimA Sep 21, 2026
731ad28
fix(workspaces): keep repository selected across same-project tabs
ShpetimA Sep 21, 2026
f8fc34e
feat(ui): slim workspace chrome and clarify project identity
ShpetimA Sep 21, 2026
158c1c9
feat(projects): browse and open repositories by directory path
ShpetimA Sep 21, 2026
31b064a
fix(ui): align tab monograms and size sidebar toggles
ShpetimA Sep 21, 2026
e8416d1
feat(workspaces): nest review tabs inside project navigation
ShpetimA Sep 21, 2026
02e52c9
feat(desktop): add project and review navigation shortcuts
ShpetimA Sep 22, 2026
252e12f
fix(desktop): open files during keyboard tree navigation
ShpetimA Sep 22, 2026
fcbd118
fix(desktop): avoid review tab and file shortcut conflicts
ShpetimA Sep 22, 2026
b380b40
feat(desktop): identify the current branch pull request in the rail
ShpetimA Sep 22, 2026
02d154b
feat(git): add branch management and remote operations
ShpetimA Sep 22, 2026
7a916c1
feat(git): add commit recovery and stash workflows
ShpetimA Sep 22, 2026
f8e28f3
feat(git): complete operation recovery and history actions
ShpetimA Sep 22, 2026
cef2ba9
feat(desktop): consolidate Git command composer
ShpetimA Sep 26, 2026
f52e8a0
Add repository and pull request commands to composer
ShpetimA Sep 26, 2026
7ff393f
Restore direct pull request review tabs
ShpetimA Sep 26, 2026
ed05d49
Prioritize composer keys and streamline navigation actions
ShpetimA Sep 26, 2026
3547207
Add provider checks and merge readiness to PR reviews
ShpetimA Sep 26, 2026
ec46683
Add project PR discovery and unified reviewer workflow
ShpetimA Sep 26, 2026
fee9130
Add PR lifecycle and review continuity
ShpetimA Sep 26, 2026
168819b
Name the unified PR review command clearly
ShpetimA Sep 26, 2026
e9c7ca0
Improve pull request review flow and begin stage six
ShpetimA Sep 26, 2026
1e58c22
Complete Git client roadmap provider extras and core Git tools
ShpetimA Sep 26, 2026
283dbd5
Scope command composer and preserve progressive cards
ShpetimA Sep 27, 2026
5700c3f
Match command composer motion to OneFor
ShpetimA Sep 27, 2026
3ed0535
Polish composer reverse transition and review arrow navigation
ShpetimA Sep 27, 2026
d64dfc3
Remove composer exit fade and simplify review arrows
ShpetimA Sep 27, 2026
f0f9051
Keep command composer keyboard focus inside layout
ShpetimA Sep 27, 2026
cd6aeed
Slide composer cards consistently on entry and exit
ShpetimA Sep 27, 2026
801f772
Open pull request links through repository setup tabs
ShpetimA Oct 23, 2026
6ab9796
Align command palette tests with scoped navigation
ShpetimA Oct 23, 2026
d6b933d
Allow Git synchronization integration test time to finish
ShpetimA Oct 23, 2026
24841f8
Rebuild pull request overview around one timeline and merge box
ShpetimA Oct 23, 2026
55c31bb
Step through a document's images in the image viewer
ShpetimA Oct 23, 2026
c2aecd6
Rebuild pull request list with status-rich rows and URL filters
ShpetimA Oct 23, 2026
88633f0
Use Pierre Highlights for diff and file syntax highlighting
ShpetimA Oct 23, 2026
e4996dd
Allow subprocess Git integration tests time to finish
ShpetimA Oct 23, 2026
4653a30
Improve PR filters, loading states, review actions, and file navigation
ShpetimA Oct 25, 2026
90729f5
Add compact commit-based pull request review
ShpetimA Oct 27, 2026
332e3a4
Share compact commit panes and polish review interactions
ShpetimA Oct 27, 2026
95c7814
Add agent-guided PR walkthroughs and compact review notes
ShpetimA Oct 27, 2026
f74d5bd
Unify guidance review diffs and add agent activity
ShpetimA Oct 27, 2026
373c49d
Improve desktop recovery, history browsing and review navigation
ShpetimA Oct 28, 2026
0764c72
Isolate Pierre tree selection and add searchable comparison refs
ShpetimA Oct 28, 2026
7a2268e
Improve history graph readability and keyboard navigation
ShpetimA Oct 29, 2026
288a1d9
Reuse prepared tree navigation indexes for large comparisons
ShpetimA Oct 29, 2026
5f23aa2
Improve repository file workflows and desktop review ergonomics
ShpetimA Oct 29, 2026
596bbe8
Align history integration test timeout with Git suites
ShpetimA Oct 29, 2026
8162249
Protect native file writes and recover workspace drafts and PR reads
ShpetimA Oct 30, 2026
50ebe8e
Preserve closed workspace drafts and recover history and comparison r…
ShpetimA Oct 30, 2026
c605771
Unify repository freshness, file-tree navigation and PR refresh
ShpetimA Oct 30, 2026
c3aabe5
Complete PR refresh and stabilize navigation and overview layouts
ShpetimA Oct 30, 2026
e41366c
Add repository setup, remote settings and upstream management
ShpetimA Oct 30, 2026
f8ff852
Fix rename handling and add binary file states
ShpetimA Oct 30, 2026
36f0944
Represent Git permissions, symbolic links and submodules
ShpetimA Oct 30, 2026
3a6d374
Add bounded image previews across repository diff views
ShpetimA Oct 31, 2026
9addc03
Add focused PR review panel with saved drafts and recovery
ShpetimA Oct 31, 2026
6bbcf82
Compact the Changes commit composer and surface command failures
ShpetimA Oct 31, 2026
23f4631
Unify file pane headers, path filters and empty states
ShpetimA Oct 31, 2026
c188475
Expose repository resources and file line authors
ShpetimA Oct 31, 2026
1646b9a
Keep background Git reads from writing the index cache
ShpetimA Oct 31, 2026
77940c9
Close quick actions with Escape and show Backspace navigation hints
ShpetimA Oct 31, 2026
4586e55
Polish review, blame, commit and settings workflows
ShpetimA Oct 31, 2026
35746a7
Provide the command launcher in PR loading tests
ShpetimA Oct 31, 2026
0ac2ce1
fix
ShpetimA Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .agents/skills/open-warden-design-system/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: open-warden-design-system
description: Build or review visible Open Warden desktop UI, including semantic tokens, canonical components, dense source-control layouts, accessibility, Storybook coverage, and visual polish. Use for UI implementation or screenshot feedback; not for business-logic-only work.
---

# Open Warden desktop UI

Read [references/ui-principles.md](references/ui-principles.md) before changing visible UI. For routed flows, screenshots, responsive behavior, overflow, or browser-visible defects, also read [references/product-screen-qa.md](references/product-screen-qa.md).

Storybook is the living definition for foundations and canonical components. The rendered desktop application is the review surface for feature composition.

## Ownership

- Keep semantic tokens in `apps/desktop/src/index.css`, reusable controls in `apps/desktop/src/components/ui`, and design-system documentation in `apps/desktop/src/design-system`.
- Keep feature-specific composition and business behavior with the owning feature until a stable reusable responsibility emerges.
- Reuse the established Base UI, Radix, and shadcn primitives. Preserve their accessibility and interaction contracts when styling them.
- Use `@tanstack/react-hotkeys` for desktop keyboard shortcuts.
- Read only the necessary Redux state at each connected boundary and keep rapidly changing subscriptions near leaf components.

## Work

1. Inspect the nearest component, its public API, stories or screen usage, and relevant tests.
2. Define information hierarchy, alignment axes, grouping, interaction states, and responsive or resize behavior before editing.
3. Use semantic tokens and canonical controls. Do not add feature-local physical palette colors when a semantic role exists.
4. Add or update stories for changed canonical behavior and meaningful states. Test rendered user behavior where coverage is needed.
5. Render the result in Storybook and its real application context. Exercise affected transitions and keyboard behavior.

## Finish gate

- Hierarchy and alignment are clear at a glance in the dense desktop layout.
- Keyboard access, focus visibility, accessible names, and relevant loading, error, selected, conflict, and disabled states work.
- Dynamic counts and diff statistics use tabular numerals; transitions target explicit properties and respect reduced motion.
- The affected widths and both themes were rendered. Tests and source inspection do not replace visual verification.
- Focused tests, Storybook build, typecheck, formatting, and `git diff --check` pass in proportion to the change.
6 changes: 6 additions & 0 deletions .agents/skills/open-warden-design-system/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface:
display_name: "Open Warden Design System"
short_description: "Build and review polished Open Warden desktop UI"
default_prompt: "Use $open-warden-design-system to build or review this Open Warden interface."
policy:
allow_implicit_invocation: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Product-screen QA

Use this for routed flows, screenshot feedback, resizable layouts, overflow, or defects visible only in the rendered application.

## Composition ownership

- `AppShell` owns desktop navigation and top-level regions; route layouts own pane structure and scroll boundaries; screens own headers, sections, fields, and actions.
- One spacing decision has one owner. Double-owned padding causes sibling routes and nested panes to drift.
- Keep related actions together and preserve logical keyboard order.
- Each bounded workspace has one deliberate scroll owner. Diff content, file trees, and sidebars must not accidentally compete for wheel or keyboard scrolling.

## Render the actual state

1. Open the exact route, repository state, selection, theme, window size, and pane widths involved.
2. Reproduce the defect before editing when possible.
3. After editing, inspect narrow and wide windows, resized panes, long paths, large counts, empty data, and both themes.
4. Exercise the complete transition, including loading, success, failure, selection, and dismissal. Confirm stale state does not flash.
5. Use keyboard navigation and verify focus movement, activation, shortcuts, dismissal, and focus return.
6. Check alignment axes, group spacing, wrapping, truncation, clipping, scroll ownership, stable row sizes, and reachable actions.
7. Capture before and after screenshots at the same route, repository state, theme, window size, pane widths, and interaction state for visible UI changes.

## Storybook review

- Canonical component stories cover meaningful variants and applicable normal, focus-visible, disabled, loading, invalid, selected, and destructive states.
- Foundation stories render semantic tokens and typography in light and dark themes.
- Stories avoid feature services and hidden global state. Provide data through public component inputs or an intentional provider seam.
- Treat accessibility addon failures as errors for canonical components.

## Finish gate

Do not report a visible issue fixed until the exact state has been rendered after the change. Passing tests and Storybook builds do not substitute for visual inspection. State what route or story, window size, theme, pane state, and interaction were checked, and disclose anything that could not be reproduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Open Warden UI principles

Open Warden should feel calm, precise, and dependable while retaining the density expected from a desktop source-control tool. Establish hierarchy with typography, alignment, and proximity before adding borders, shadows, or extra surfaces.

## Hierarchy and alignment

- Decide the primary element and reading order before styling. It should remain obvious in grayscale or when briefly blurred.
- Give each visual group one dominant alignment axis. Prefer a few strong edges over many nearly aligned coordinates.
- Use no more than three text levels inside a compact surface. Sibling roles use the same preset.
- Reserve larger type for route and panel identity. Dense rows use 12–14px metadata and 14–16px primary labels.
- Muted text is secondary, not faint. Use tabular numerals for counts, line numbers, dates, durations, and diff statistics.
- Use monospace only for code, refs, hashes, file paths when alignment helps, and machine-shaped values.

## Spacing and geometry

- Use the four-pixel rhythm. Keep gaps within a group smaller than gaps between groups.
- Parent layouts own sibling spacing through `gap`; children do not impose unexplained outer margins.
- Padding defines a container interior. Gap defines sibling relationships.
- Desktop density must not reduce interactive hit areas below 40px unless a larger non-overlapping invisible hit target is provided.
- Nested surfaces use concentric radii: outer radius equals inner radius plus the inset.
- Resizable panes preserve useful minimum sizes, reachable actions, and one clear scroll owner per region.

## Color, surfaces, and motion

- Consume semantic variables exposed through Tailwind. Feature styling does not use physical palette colors when a semantic token exists.
- Source-control states use `diff-addition`, `diff-deletion`, `diff-modification`, and `diff-conflict`; hue is never the only state indicator.
- Canvas, inset panel, raised, overlay, toolbar, and active surfaces have distinct roles. Use depth only for actual elevation or focus.
- Keep dividers as borders. Use layered shadows for raised cards, menus, popovers, and dialogs where depth matters.
- Use interruptible CSS transitions for interaction changes and name only the properties that change. Respect reduced motion.
- Press feedback may use `scale(0.96)` when it does not distract or reflow surrounding content.

## Components and behavior

- Standard buttons, fields, selection controls, menus, popovers, dialogs, tooltips, and scroll areas come from `src/components/ui`.
- Use buttons for actions and links for navigation. Icon-only controls require explicit accessible names and tooltips when meaning is not obvious.
- Persistent form labels identify fields; placeholders show examples or formats.
- Async actions keep the canonical control mounted, communicate progress, and prevent duplicate activation.
- Use menus for actions, comboboxes for searchable choices, popovers for anchored context, dialogs for blocking workflows, alert dialogs for consequential decisions, and alerts for inline status.
- Keyboard shortcuts use `@tanstack/react-hotkeys` and remain discoverable through labels, menus, or `Kbd` hints.

## Evolving the system

- Extend an existing component when the responsibility is unchanged and reusable.
- Create a canonical component when the semantic role or interaction model is distinct.
- Keep experimental or one-screen composition feature-owned until a stable API is visible through repeated use.
- Do not turn a single screenshot correction into a universal rule.
47 changes: 47 additions & 0 deletions .agents/skills/open-warden-file-trees/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: open-warden-file-trees
description: Implement or debug Open Warden file trees, grouping, selection, keyboard focus, mutation navigation, and large-repository rendering. Use for Pierre tree changes; not ordinary diff styling or unrelated lists.
---

# Open Warden file trees

Read AGENTS.md and apply readable-code, coding-standards, and open-warden-design-system when relevant. Inspect the owning tree and its tests before editing.

## One prepared model

`FileList` projects source files into display identities. Review groups, repeated commit paths, flat-list disambiguation, and Changes buckets are meaningful parts of those identities. `SelectedPierreFileTree` places the Redux selection subscription below that work. `PierreFileTreeBrowser` owns the live Pierre model and its prepared input.

Keep source identity separate from display path. Preserve bucket identity and commit/revision context when selecting, commenting, staging, or returning to a diff. A path repeated under two commits represents two different review targets.

Pass `FileList.selection` a leaf Redux selector, or use `SelectedPierreFileTree`. Controlled strings are appropriate for local UI state. A component listening to active selection must not also rebuild projections, groups, path maps, or Git status. Do not introduce memo/useMemo/useCallback to hide subscription mistakes.

## Navigation and mutations

Use `pierreFileTreeNavigation.ts` and the renderer's registered prepared projection. J/K uses `movePierreFileTreeFileForKey`; hierarchy movement uses `movePierreFileTreeHierarchy`. Read live expansion and preserve the renderer's flattening rules.

For selection after removal, `preparedFileAfterRemoval` chooses the next visible surviving file, then the previous file at the boundary. Bucketed mutations use `getPierreFileAfterRemoval`. Capture the originating workspace and selection before a mutation. Resolve its replacement from the live prepared projection when the mutation succeeds; expansion or filtering may have changed while it was pending. Activate only if the originating workspace and selection are still current. Failed operations must not advance optimistically; reconcile any actual partial removal through the same prepared model. Do not jump to a collapsed file, folder heading, temporary input, or another occurrence of the same source path.

Do not build an alternative order from provider arrays, an alphabetic sort, or mounted DOM rows. DOM lookup is for focusing/scrolling an already chosen identity, never for deciding order. Virtualized offscreen files still participate in the model.

Selection and keyboard focus are separate. A reconciliation callback selects a review target; it must not switch the active pane. History's file callback dispatches `setActivePath`; explicit clicks and H/L own `historyNavTarget`. `useHistorySync` clears unavailable selections but never chooses a provider-array first file. Initial selection comes from visible files in the registered prepared projection, excluding directories and inline editors.

During data replacement preserve the mounted tree, collapsed/expanded directories, selection, focus owner, and scroll. Preserve a surviving focused folder even when a different file stays selected. Mutation completion must not restore tree focus after the user moves to an editor or another workspace; an unmounted origin cannot request focus. Retained-read loading/error surfaces must not unmount it. Do not steal focus from an editor or search field during background refresh. Use existing explicit tree-focus requests for virtualized row readiness; investigate failures instead of adding arbitrary sleeps or test retries.

## Freshness and performance

Native repository mutation completion and filesystem hints feed `RepositoryEvents`; `RepositoryFreshnessBootstrap` translates them into repository-scoped query invalidation. Reads do not publish mutation events. Extend that policy instead of adding another watcher or polling loop in a pane. Keep immutable commit data separate from mutable worktree/ref data.

Prepared navigation indexes resolve directory handles when input changes, then read live expansion. Selection-only registration must not rebuild grouping, sorting, directory indexes, or status. Retain RTK Query data references with narrow `selectFromResult` subscriptions. Large trees are virtualized; a small mounted row count does not prove inexpensive preparation.

## Verification

Use real Pierre models to exercise prepared order, collapsed and flattened directories, repeated paths, and bucket identity. Through rendered UI verify success, failure, removal, filtering, refresh, and keyboard focus; preserve assertions rather than hiding intermittent failures. Test actual native watchers/mutations with temporary Git repositories, never test writes in a user's repository.

Relevant suites:

- `components/pierreFileTreeProjection.test.ts` and `pierreFileTreeRemoval.test.ts`
- `tests/e2e/changes-refresh.spec.ts`, `tests/e2e/file-editing.spec.ts`, and `tests/e2e/history-commits.spec.ts`
- `tests/e2e/branch-review.spec.ts` and `tests/e2e/pull-request-commits.spec.ts`
- `tests/electron/repository-freshness.spec.ts`

For performance-sensitive changes run `tests/electron/branch-review-navigation.spec.ts` with `OPEN_WARDEN_REVIEW_REPO`, `OPEN_WARDEN_REVIEW_BASE`, `OPEN_WARDEN_REVIEW_HEAD`, and optional `OPEN_WARDEN_REVIEW_FILE` / `OPEN_WARDEN_RENDERER_URL`. It uses real Git data read-only and saves a CPU profile. Include deep paths, thousands of files, and a rendered diff. Record what was actually measured; synthetic shallow trees and passing correctness tests do not establish native latency or memory guarantees.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ apps/*/src-tauri/target/
coverage/
playwright-report/
test-results/
api-ref/
api-ref/
storybook-static/
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
- Use RTK Query selectFromResult to subscribe only to needed fields.
- Ignore backwards compatibility to apis unless explicitly told so
- For api reference github or bitbucket ./api-ref/
- Pierre file lists use `FileList.selection` with a Redux selector, or `SelectedPierreFileTree`, to keep active-path subscriptions below file projection, grouping, lookup maps, and Git-status construction. Controlled selection is for local UI state.
- Pierre keyboard navigation uses `movePierreFileTreeFileForKey` and the renderer's prepared projection. Do not derive another navigation order from provider arrays or mounted DOM rows. Preserve bucket/commit identity and the renderer's flattening and expansion rules.
- For file-tree rendering, grouping, selection, mutation navigation, or performance work, read `.agents/skills/open-warden-file-trees/SKILL.md`. Native repository freshness belongs to the shared event owner; panes must not introduce their own watchers.
- Keep automatic file selection separate from pane navigation; refreshing a file list must not switch the active pane.
33 changes: 33 additions & 0 deletions apps/desktop/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import path from "node:path";
import { fileURLToPath } from "node:url";

import tailwindcss from "@tailwindcss/vite";
import type { StorybookConfig } from "@storybook/react-vite";
import { mergeConfig } from "vite";

const configDirectory = path.dirname(fileURLToPath(import.meta.url));

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: ["@storybook/addon-a11y", "@storybook/addon-docs", "@storybook/addon-themes"],
framework: {
name: "@storybook/react-vite",
options: {},
},
core: {
disableTelemetry: true,
},
async viteFinal(baseConfig) {
return mergeConfig(baseConfig, {
plugins: [tailwindcss()],
resolve: {
alias: {
"@": path.resolve(configDirectory, "../src"),
},
dedupe: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"],
},
});
},
};

export default config;
53 changes: 53 additions & 0 deletions apps/desktop/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { withThemeByClassName } from "@storybook/addon-themes";
import type { Preview } from "@storybook/react-vite";

import "../src/index.css";
import "./storybook.css";

const preview: Preview = {
decorators: [
withThemeByClassName({
themes: {
light: "",
dark: "dark",
},
defaultTheme: "dark",
}),
],
tags: ["autodocs"],
parameters: {
a11y: {
test: "error",
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
docs: {
toc: true,
},
layout: "centered",
options: {
storySort: {
order: [
"Design system",
[
"Introduction",
"Design language",
"Product map",
"Foundations",
["*"],
"Components",
["*"],
"Compositions",
["*"],
],
],
},
},
},
};

export default preview;
19 changes: 19 additions & 0 deletions apps/desktop/.storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
html,
body,
#storybook-root {
min-height: 100%;
}

body {
-webkit-font-smoothing: antialiased;
}

#storybook-root {
isolation: isolate;
}

.docs-story,
.sb-show-main {
background: var(--background);
color: var(--foreground);
}
5 changes: 5 additions & 0 deletions apps/desktop/electron/appSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ export async function watchAppSettings(options: {
scheduleReload();
});

watcher.on("error", (error) => {
watcher.close();
if (!disposed) options.onError?.(error);
});

return () => {
disposed = true;
if (reloadTimer !== null) {
Expand Down
Loading
Loading