Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
21 changes: 0 additions & 21 deletions .codex/environments/environment.toml

This file was deleted.

164 changes: 0 additions & 164 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,169 +40,5 @@ module.exports = {
{
files: ['**/*.ts', '**/*.tsx'],
},
{
files: [
'src/features/workspaces/components/*Prompt.tsx',
'src/features/git/components/BranchSwitcherPrompt.tsx',
'src/features/threads/components/RenameThreadPrompt.tsx',
'src/features/settings/components/SettingsView.tsx',
],
rules: {
'no-restricted-syntax': [
'error',
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='role'][value.value='dialog']",
message:
'Use `ModalShell` for modal dialog shell markup instead of `<div role="dialog">`.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='aria-modal']",
message:
'Use `ModalShell` for modal dialog shell markup instead of manually setting `aria-modal`.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/\\b[a-z0-9-]*modal-(overlay|backdrop|window|card)\\b/]",
message:
'Modal shell chrome belongs in `ModalShell`; avoid legacy `*-modal-overlay/backdrop/window/card` wrappers.',
},
{
selector:
"Literal[value=/#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(/]",
message:
'Avoid hardcoded color literals in DS-targeted components; use design-system CSS variables/tokens.',
},
],
},
},
{
files: [
'src/features/git/components/GitDiffPanel.tsx',
'src/features/files/components/FileTreePanel.tsx',
'src/features/prompts/components/PromptPanel.tsx',
],
rules: {
'no-restricted-syntax': [
'error',
{
selector: "JSXOpeningElement[name.name='aside']",
message: 'Use `PanelFrame` instead of raw `<aside>` for DS panel shells.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/\\b(file-tree-meta|prompt-panel-meta|file-tree-search|prompt-panel-search|file-tree-search-icon|prompt-panel-search-icon|file-tree-search-input|prompt-panel-search-input)\\b/]",
message:
'Use DS panel sub-primitives (`PanelMeta` / `PanelSearchField`) for meta/search shell markup.',
},
{
selector:
"Literal[value=/#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(/]",
message:
'Avoid hardcoded color literals in DS-targeted components; use design-system CSS variables/tokens.',
},
],
},
},
{
files: [
'src/features/app/components/ApprovalToasts.tsx',
'src/features/notifications/components/ErrorToasts.tsx',
'src/features/update/components/UpdateToast.tsx',
],
rules: {
'no-restricted-syntax': [
'error',
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/^(approval-toasts|error-toasts|update-toasts)$/]",
message:
'Use `ToastViewport` for toast region wrappers instead of raw `<div>` wrappers.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/^(approval-toast|error-toast|update-toast)$/]",
message:
'Use `ToastCard` for toast cards instead of raw `<div>` wrappers.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/^(approval-toast-header|error-toast-header|update-toast-header|approval-toast-actions|update-toast-actions|update-toast-error)$/]",
message:
'Use DS toast sub-primitives (`ToastHeader`, `ToastActions`, `ToastError`) for shared toast structure.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='aria-live']",
message:
'Use `ToastViewport` for live-region semantics instead of raw `<div aria-live>` wrappers.',
},
{
selector:
"Literal[value=/#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(/]",
message:
'Avoid hardcoded color literals in DS-targeted components; use design-system CSS variables/tokens.',
},
],
},
},
{
files: ['src/features/git/components/GitDiffViewer.tsx'],
rules: {
'no-restricted-syntax': [
'error',
{
selector:
"Literal[value=/#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(/]",
message:
'Avoid hardcoded diff color literals; use DS diff theme variables from `ds-diff.css`.',
},
],
},
},
{
files: [
'src/features/app/components/MainHeader.tsx',
'src/features/app/components/LaunchScriptButton.tsx',
'src/features/app/components/LaunchScriptEntryButton.tsx',
'src/features/app/components/OpenAppMenu.tsx',
'src/features/app/components/Sidebar.tsx',
'src/features/app/components/SidebarHeader.tsx',
'src/features/app/components/SidebarCornerActions.tsx',
'src/features/composer/components/ComposerInput.tsx',
'src/features/files/components/FilePreviewPopover.tsx',
'src/features/workspaces/components/WorkspaceHome.tsx',
],
rules: {
'no-restricted-syntax': [
'error',
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='className'][value.value=/\\b(workspace-add-menu|sidebar-sort-dropdown|sidebar-account-popover|worktree-info-popover|workspace-branch-dropdown|launch-script-popover|open-app-dropdown|file-preview-popover)\\b/]",
message:
'Use `PopoverSurface` for popover/dropdown shell markup instead of raw `<div>` wrappers.',
},
{
selector:
"JSXOpeningElement[name.name='div'] > JSXAttribute[name.name='role'][value.value=/^(menu|listbox)$/]",
message:
'Use `PopoverSurface` for popover/dropdown shell semantics instead of raw `<div role=\"menu|listbox\">` wrappers.',
},
{
selector:
"JSXOpeningElement[name.name='button'] > JSXAttribute[name.name='className'][value.value=/\\b(open-app-option|workspace-add-option|sidebar-sort-option)\\b/]",
message:
'Use `PopoverMenuItem` for precomputed popover list entries instead of raw `<button>` menu rows.',
},
{
selector:
"Literal[value=/#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(/]",
message:
'Avoid hardcoded color literals in DS-targeted components; use design-system CSS variables/tokens.',
},
],
},
},
],
};
121 changes: 24 additions & 97 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ on:
branches: ["main"]

jobs:
test-tauri:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
- name: Install CMake
run: command -v cmake >/dev/null 2>&1 || brew install cmake
- name: Rust tests
run: cargo test
working-directory: src-tauri
lint:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -43,81 +63,12 @@ jobs:
run: npm ci
- name: Tests
run: npm run test

test-tauri:
name: Rust tests (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- name: macOS
os: macos-latest
- name: Linux
os: ubuntu-latest
- name: Windows
os: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: command -v cmake >/dev/null 2>&1 || brew install cmake
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libasound2-dev \
pkg-config
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: choco install cmake llvm -y --no-progress
- name: Configure LLVM (Windows)
if: runner.os == 'Windows'
run: |
echo "LIBCLANG_PATH=C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_ENV
echo "C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_PATH
- name: Rust tests
run: cargo test
working-directory: src-tauri

build-tauri:
name: Tauri build (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
build-macos:
runs-on: macos-latest
needs:
- lint
- typecheck
- test-js
- test-tauri
strategy:
fail-fast: false
matrix:
platform:
- name: macOS
os: macos-latest
build_command: npm run tauri -- build --debug --no-bundle
- name: Linux
os: ubuntu-latest
build_command: npm run tauri -- build --debug --no-bundle
- name: Windows
os: windows-latest
build_command: npm run tauri -- build --debug --no-bundle --config src-tauri/tauri.windows.conf.json
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -135,33 +86,9 @@ jobs:
key: ${{ runner.os }}-cargo-build-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
- name: Install CMake
run: command -v cmake >/dev/null 2>&1 || brew install cmake
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libasound2-dev \
pkg-config
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: choco install cmake llvm -y --no-progress
- name: Configure LLVM (Windows)
if: runner.os == 'Windows'
run: |
echo "LIBCLANG_PATH=C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_ENV
echo "C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_PATH
- name: Install dependencies
run: npm ci
- name: Doctor (Windows)
if: runner.os == 'Windows'
run: npm run doctor:win
- name: Tauri debug build
run: ${{ matrix.platform.build_command }}
run: npm run tauri -- build --debug --no-bundle
Loading