This change combines several UI/UX and submodule-related updates:
Submodule authentication and revision checkout:
Submodule actions (add, action commands) now accept optional username/password and forward them to submodule Git commands. The low-level helper submodule_git was extended to call run_git_authenticated when credentials are provided.
Auth failures from Git are classified: non-success output is inspected and returned with an "AUTH_FAILED:" prefix for authentication-specific errors.
A new checkout flow for submodules was added (checkout_revision + checkout_submodule_revision Tauri command). It supports selecting a local tag or entering a commit hash, validates the input, ensures the submodule is initialized and clean (no local changes or conflicts), checks refs locally, and performs a detached checkout without changing the parent index.
add_submodule and submodule_action endpoints were extended to accept username/password; README updated to document choosing a tag/commit and fetching remote revisions.
Unit tests were added for authenticated submodule command handling, classification of auth failures, and submodule revision checkout behavior.
Frontend: centralized confirmation dialog and submodule UI state
App.svelte now imports and wires a centralized ConfirmDialog and provides a small API around it: askConfirmation / requestConfirmation / answerConfirmation and a ConfirmAnswer shape (confirmed, value, checked). This enables confirmations that include an input field and a checkbox (used for several flows such as branch delete and discard confirmations).
Helper builders for common confirmation variants were added (branchDeleteConfirmRequest and discardConfirmRequest) that use i18n t(...).
Added front-end state for submodule authentication prompts (submoduleAuthRequest, submoduleAuthError, submoduleAuthSaving) and exposed checkoutSubmoduleRevision in the client command imports.
setLanguage from i18n is invoked when applying language preferences.
Sidebar panel sizing refactor
The left sidebar panel sizing was unified: multiple per-panel height keys and handlers were replaced with a single model describing panel order, per-panel min/default heights, a SIDEBAR_PANEL_HEIGHTS_KEY (v2) localStorage entry, and functions to load/persist heights and compute clamp/resize behavior.
Previous per-panel storage keys and individual resize state were removed in favor of a single sidebarPanelHeights record and shared resize handling.
Notes on scope and implementation details:
Back-end: changes live in src-tauri/src/git/submodules.rs. Key additions are operate_authenticated, submodule_git accepting credentials, checkout_revision, checkout_submodule_revision Tauri command, and tests in the same module.
Front-end: changes live in src/App.svelte: confirm dialog plumbing, i18n setLanguage usage, sidebar sizing constants and persistence, and submodule auth UI state.
The README change documents the new revision selection and fetch behavior for submodules.
Testing
Tests were added in src-tauri/src/git/submodules.rs (unit tests covering authenticated command handling, auth failure classification, and checkout behavior). No test execution results were provided.
Recommended reviewer checks (manual / local):
Run the repository unit tests (cargo test) to exercise the new submodule tests.
Verify a submodule flow in the app: initialize a submodule, use "Fetch tags & commits", then use the "Change commit or tag" flow to select a tag and a commit and confirm the parent index is not staged.
Confirm auth behavior: trigger a submodule Git operation against a repo that requires credentials and verify the AUTH_FAILED classification leads to the expected login prompt in the UI.
Verify sidebar behavior: resize panels, reload the app, and confirm sizes persist to localStorage under gitlite.sidebarPanelHeights.v2 and that older per-panel keys are ignored.
Check confirm dialog variations (simple yes/no, with input, with checkbox) and i18n strings render via t(...).
Compatibility and reviewer notes
LocalStorage migration: the previous per-panel height keys have been replaced by SIDEBAR_PANEL_HEIGHTS_KEY (gitlite.sidebarPanelHeights.v2). Existing stored values for the old keys will not be read; reviewers should note that sidebar sizes will fall back to defaults on upgrade unless migration is intentionally added.
Error string prefix: authentication errors are returned with an "AUTH_FAILED:" prefix. Consumers should treat that prefix as a signal to show credential prompts; it is used by the added tests.
New Tauri command: checkout_submodule_revision is exported from src-tauri/src/main.rs and imported in the frontend (checkoutSubmoduleRevision). Reviewers should verify Tauri command registration and any frontend code that invokes this command.
No claims are made about test runs or CI; the description only reports added tests and code changes. No test execution results were provided.
This change combines several UI/UX and submodule-related updates:
- Submodule authentication and revision checkout:
- Submodule actions (add, action commands) now accept optional username/password and forward them to submodule Git commands. The low-level helper submodule_git was extended to call run_git_authenticated when credentials are provided.
- Auth failures from Git are classified: non-success output is inspected and returned with an "AUTH_FAILED:" prefix for authentication-specific errors.
- A new checkout flow for submodules was added (checkout_revision + checkout_submodule_revision Tauri command). It supports selecting a local tag or entering a commit hash, validates the input, ensures the submodule is initialized and clean (no local changes or conflicts), checks refs locally, and performs a detached checkout without changing the parent index.
- add_submodule and submodule_action endpoints were extended to accept username/password; README updated to document choosing a tag/commit and fetching remote revisions.
- Unit tests were added for authenticated submodule command handling, classification of auth failures, and submodule revision checkout behavior.
- Frontend: centralized confirmation dialog and submodule UI state
- App.svelte now imports and wires a centralized ConfirmDialog and provides a small API around it: askConfirmation / requestConfirmation / answerConfirmation and a ConfirmAnswer shape (confirmed, value, checked). This enables confirmations that include an input field and a checkbox (used for several flows such as branch delete and discard confirmations).
- Helper builders for common confirmation variants were added (branchDeleteConfirmRequest and discardConfirmRequest) that use i18n t(...).
- Added front-end state for submodule authentication prompts (submoduleAuthRequest, submoduleAuthError, submoduleAuthSaving) and exposed checkoutSubmoduleRevision in the client command imports.
- setLanguage from i18n is invoked when applying language preferences.
- Sidebar panel sizing refactor
- The left sidebar panel sizing was unified: multiple per-panel height keys and handlers were replaced with a single model describing panel order, per-panel min/default heights, a SIDEBAR_PANEL_HEIGHTS_KEY (v2) localStorage entry, and functions to load/persist heights and compute clamp/resize behavior.
- Previous per-panel storage keys and individual resize state were removed in favor of a single sidebarPanelHeights record and shared resize handling.
Notes on scope and implementation details:
- Back-end: changes live in src-tauri/src/git/submodules.rs. Key additions are operate_authenticated, submodule_git accepting credentials, checkout_revision, checkout_submodule_revision Tauri command, and tests in the same module.
- Front-end: changes live in src/App.svelte: confirm dialog plumbing, i18n setLanguage usage, sidebar sizing constants and persistence, and submodule auth UI state.
- The README change documents the new revision selection and fetch behavior for submodules.
Testing
- Tests were added in src-tauri/src/git/submodules.rs (unit tests covering authenticated command handling, auth failure classification, and checkout behavior). No test execution results were provided.
- Recommended reviewer checks (manual / local):
1) Run the repository unit tests (cargo test) to exercise the new submodule tests.
2) Verify a submodule flow in the app: initialize a submodule, use "Fetch tags & commits", then use the "Change commit or tag" flow to select a tag and a commit and confirm the parent index is not staged.
3) Confirm auth behavior: trigger a submodule Git operation against a repo that requires credentials and verify the AUTH_FAILED classification leads to the expected login prompt in the UI.
4) Verify sidebar behavior: resize panels, reload the app, and confirm sizes persist to localStorage under gitlite.sidebarPanelHeights.v2 and that older per-panel keys are ignored.
5) Check confirm dialog variations (simple yes/no, with input, with checkbox) and i18n strings render via t(...).
Compatibility and reviewer notes
- LocalStorage migration: the previous per-panel height keys have been replaced by SIDEBAR_PANEL_HEIGHTS_KEY (gitlite.sidebarPanelHeights.v2). Existing stored values for the old keys will not be read; reviewers should note that sidebar sizes will fall back to defaults on upgrade unless migration is intentionally added.
- Error string prefix: authentication errors are returned with an "AUTH_FAILED:" prefix. Consumers should treat that prefix as a signal to show credential prompts; it is used by the added tests.
- New Tauri command: checkout_submodule_revision is exported from src-tauri/src/main.rs and imported in the frontend (checkoutSubmoduleRevision). Reviewers should verify Tauri command registration and any frontend code that invokes this command.
- No claims are made about test runs or CI; the description only reports added tests and code changes. No test execution results were provided.
Christoph
added 10 commits 2026-09-17 21:12:48 +00:00
- Add a text filter with highlight and clear (Esc to clear) that narrows visible branches and auto-opens folders while filtering.
- Persist panel view state (local/remote open + collapsed folders) to localStorage under "gitlite.branchPanelView.v2" so folder open/collapse and section visibility survive reloads.
- Reveal current branch action: clears filter, expands path to current branch, scrolls it into view and briefly flashes it.
- Rework branch list rendering: unified folder/branch ids, scope-aware rows, tracking status computation (tracked/gone/local/remote-tracked), richer titles/tooltips, updated icons, and better context-menu positioning/behavior (separate showBranchMenuAt + open-from-button).
- Prevent toggling folder collapse while filtering; folder rows are implicitly open when a filter is active.
- Add slim, rounded custom scrollbars for the left sidebar in src/app.css.
No external APIs changed; behavior is additive and intended to improve branch navigation and discoverability.
Add CSS rules for the PR badge in RepositoryDashboard.svelte to provide a compact, padded hit area and a soft outlined hover/focus treatment (using color-mix) instead of a hard filled block. Sizes are tuned for list- and tiles-view, transitions are added for color/border/background, and a .pr-error hover variant applies an error accent. This is a purely presentational change.
Add credential-aware submodule operations and a command to checkout a specific
tag or commit in a submodule without staging the parent repository.
- Backend (src-tauri):
- Export checkout_submodule_revision and implement checkout_revision which
validates tag vs commit inputs, verifies refs locally, and checks out the
submodule in detached mode without modifying the parent's index.
- Add optional username/password parameters to add_submodule and submodule_action
flows. Implement submodule_git to call run_git_authenticated when credentials
are supplied and classify auth failures by prefixing errors with "AUTH_FAILED:".
- Wire authenticated variants (operate_authenticated, add_authenticated) and
update fetch/update actions to use credentials where needed.
- Add unit tests covering authenticated submodule commands, auth failure
classification, and checkout-by-tag/commit behavior.
- Frontend:
- App.svelte: introduce credential prompt flow (withSubmoduleCredentials,
submit/cancel handlers), surface credential dialog on auth failures, and
wire credentialed calls for initialize/add/update/fetch operations. Hook up
checkoutSubmoduleRevision and listTags to the submodule dialog.
- SubmoduleDialog.svelte: add UI for selecting destination folder, loading
tags and checking out revisions; expose fetch action.
- CredentialDialog.svelte: include "submodule" action and adjust labels.
- Docs:
- README: document "Change commit or tag" and "Fetch tags & commits" behaviors.
The commit focuses only on enabling credentialed submodule interactions and
safe local checkouts of tags/commits; no other git behavior changes are made.
Introduce a generic ConfirmDialog and a promise-based requestConfirmation API in
App.svelte so callers can await user responses instead of using window.confirm.
Provide helper builders (branchDeleteConfirmRequest, discardConfirmRequest) to
create dialog content for common cases. Many call sites were switched to use
requestConfirmation and now render the in-app ConfirmDialog; the previous
specialized confirm components (BranchDeleteConfirmDialog, DiscardConfirmDialog)
were removed.
Add lightweight i18n support (setLanguage, t()) and new messages/i18n modules,
and replace hardcoded English strings in several components (e.g. AiSettingsPage,
BlameDialog and many confirmation prompts) with translated keys.
Summary of effects:
- Replaces native window.confirm with awaitable in-app ConfirmDialog dialogs.
- Centralizes confirmation UI and content construction in App.svelte.
- Adds i18n plumbing and updates UI text to use t().
- Removes two specialized confirm dialog components and adds src/lib/components/ConfirmDialog.svelte.
Move and consolidate scrollbar styling into a single block at the end of app.css.
Remove the scattered top-level rule and the left-sidebar-specific overrides and
replace them with a unified set of rules that use ::-webkit-scrollbar pseudo-
elements and reset scrollbar-width/color to auto so WebKit styling wins.
- Set WebKit scrollbar size to 8px, rounded thumb with min-height/border and
color-mix background.
- Unify hover/active thumb colors to use --app-scrollbar-thumb and
--app-scrollbar-thumb-hover.
- Keep hidden scrollbars for .repo-tabs-scroll.
Update color token values in src/app.css. The change tweaks muted ink shades
and replaces the accent color hex, affecting primary/hero gradients and the
security-note icon color.
- Modified --color-ink-faint, --color-ink-dim, --color-ink-quiet in theme and
light theme variants.
- Replaced --color-accent (#0f8fb5 -> #0c7691) and updated its uses in
.btn-primary gradients, .cred-hero-icon gradient, and .cred-security-note svg.
Replace per-panel height constants, state, loaders and resize handlers with a single
model for all left sidebar panels. Panel sizes are now stored/read as a JSON
object under "gitlite.sidebarPanelHeights.v2" and managed via shared helpers.
Key changes and behavior:
- Introduce SIDEBAR_PANEL_ORDER, per-panel MIN/DEFAULT heights and a shared MAX/STEP.
- Single in-memory map sidebarPanelHeights with clamp/load/persist helpers.
- One pointer/keyboard resize flow: startSidebarPanelResize, onSidebarPanelResizeMove,
endSidebarPanelResize and onSidebarPanelResizeKeydown. Dragging moves the border
between the panel above (grows) and the next expanded panel below (shrinks).
The last expanded panel is flexible (1fr) and follows automatically.
- Double-click on a handle resets the above/below panels to their defaults.
- buildLeftSidebarRows now derives grid rows from the unified state; template uses
new handlers and aria attributes.
- LocalStorage remains best-effort; persistence failures are ignored as before.
Removes many duplicate functions/variables for individual panels and simplifies
the UI logic for showing/hiding resize handles and resizing behavior.
Introduce richer confirmation dialogs and wire them through the UI so actions
can collect an optional single-line input and a checkbox option.
- ConfirmDialog: support optional input and checkbox (with defaultChecked),
expose onConfirm(result: {checked, value}). Focus/selects input when present
and blocks confirm while required inputs/checkboxes are missing.
- App: add askConfirmation(...) returning {confirmed, value, checked} and keep
requestConfirmation(...) as a convenience boolean wrapper. Update answer flow
to pass the full result. Use the new prompt in stashStatusFiles to collect a
stash message and "include untracked" option before saving.
- Status/Explorer/Worktree: add multi-selection support for stop-tracking and
stash operations. onStopTracking now accepts an array of paths and a new
"selection" kind; status context menu shows selection counts and uses a
CopyCheck icon for selections. Added corresponding i18n messages.
This change keeps existing UX but enables collecting extra confirmation data
and acting on multi-file selections.
Add a repository picker to the Review Center and wire it into the request
filtering logic. Introduces repositoryFilter state and a derived
repositoryOptions list (grouped by owner and carrying counts). If the
chosen repository disappears from the options, the filter is cleared
automatically.
Enhance SelectMenu to support per-option meta text and an optional
optionIcon snippet. Render options as [icon] label [meta] with updated
markup and CSS to align and style icon/label/meta. Adjust toolbar grid
and responsive CSS to make room for the new repository picker and to
tweak select popup/option styles.
Add an optional optionMeta snippet to SelectMenu to render richer,
right-aligned content per option (falls back to option.meta when not
provided). Update SelectMenu markup to render optionMeta if present.
Style adjustments for .select-menu-option-meta to align items, allow
inline SVGs, and preserve spacing/coloring.
Use the new slot in CreateReviewDialog:
- supply grouped repository options (owner + name) instead of raw names
- show a branch icon for each option and a lock icon + last-updated date
in the option meta
- add helpers repositoryById and formatUpdatedAt to resolve repository
data for the meta snippet
No breaking changes: legacy option.meta still works when optionMeta is
not supplied.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This change combines several UI/UX and submodule-related updates:
Submodule authentication and revision checkout:
Frontend: centralized confirmation dialog and submodule UI state
Sidebar panel sizing refactor
Notes on scope and implementation details:
Testing
Compatibility and reviewer notes
Add credential-aware submodule operations and a command to checkout a specific tag or commit in a submodule without staging the parent repository. - Backend (src-tauri): - Export checkout_submodule_revision and implement checkout_revision which validates tag vs commit inputs, verifies refs locally, and checks out the submodule in detached mode without modifying the parent's index. - Add optional username/password parameters to add_submodule and submodule_action flows. Implement submodule_git to call run_git_authenticated when credentials are supplied and classify auth failures by prefixing errors with "AUTH_FAILED:". - Wire authenticated variants (operate_authenticated, add_authenticated) and update fetch/update actions to use credentials where needed. - Add unit tests covering authenticated submodule commands, auth failure classification, and checkout-by-tag/commit behavior. - Frontend: - App.svelte: introduce credential prompt flow (withSubmoduleCredentials, submit/cancel handlers), surface credential dialog on auth failures, and wire credentialed calls for initialize/add/update/fetch operations. Hook up checkoutSubmoduleRevision and listTags to the submodule dialog. - SubmoduleDialog.svelte: add UI for selecting destination folder, loading tags and checking out revisions; expose fetch action. - CredentialDialog.svelte: include "submodule" action and adjust labels. - Docs: - README: document "Change commit or tag" and "Fetch tags & commits" behaviors. The commit focuses only on enabling credentialed submodule interactions and safe local checkouts of tags/commits; no other git behavior changes are made.Introduce richer confirmation dialogs and wire them through the UI so actions can collect an optional single-line input and a checkbox option. - ConfirmDialog: support optional input and checkbox (with defaultChecked), expose onConfirm(result: {checked, value}). Focus/selects input when present and blocks confirm while required inputs/checkboxes are missing. - App: add askConfirmation(...) returning {confirmed, value, checked} and keep requestConfirmation(...) as a convenience boolean wrapper. Update answer flow to pass the full result. Use the new prompt in stashStatusFiles to collect a stash message and "include untracked" option before saving. - Status/Explorer/Worktree: add multi-selection support for stop-tracking and stash operations. onStopTracking now accepts an array of paths and a new "selection" kind; status context menu shows selection counts and uses a CopyCheck icon for selections. Added corresponding i18n messages. This change keeps existing UX but enables collecting extra confirmation data and acting on multi-file selections.