Commit Graph
22 Commits
Author SHA1 Message Date
Christoph 5db4f36abf feat(integrations): support automatic branch cleanup after merge
Add a new git::review_cleanup module that implements a CleanupPlan with
prepare() and finish() routines to safely remove/clean tracking and local
branches after a PR/MR is merged. The cleanup logic validates branch names,
ensures a clean worktree, checks remotes/URLs, verifies commits/ancestry,
protects against concurrent worktrees or divergent local/remote commits, and
performs authenticated fetch/push and ref updates. Unit tests for the cleanup
behavior are included.

Wire provider-side cleanup into integrations:
- add an integrations/cleanup module to read provider PR payloads and derive
  cleanup inputs
- run cleanup::prepare(...) before performing a merge when an optional
  cleanup_path is provided
- after a successful provider merge, run cleanup::finish(...); any failure is
  reported as MERGE_ACCEPTED_CLEANUP_FAILED

Also:
- export the new git review_cleanup module (src-tauri/src/git.rs)
- accept an optional cleanup_path parameter in run_integration_review_action
- remove the previous REVIEW_REQUEST_TIMEOUT wrapper around the spawned
  blocking task (the integration action is no longer wrapped with the 35s timeout)
2026-09-18 15:22:57 +02:00
Christoph 6a40159f9f feat(integrations): add merge-method selection and provider-specific payloads
Introduce dedicated merge handling for integration review merges:

- Add src-tauri/src/integrations/merge.rs: implements merge_options (read provider repo settings), merge_payload (build provider-specific merge body) and a Tauri command get_integration_review_merge_options. Includes unit tests for behavior.
- Wire merge module into integrations.rs and pass an optional merge_method into provider-specific review action functions (GitHub, GitLab, Gitea, Azure DevOps). run_integration_review_action now accepts an optional merge_method, validates it early, and includes provider-specific merge payloads when performing a merge.
- Export the new command in src-tauri/src/main.rs so the frontend can request merge options.

Frontend changes to support selecting a merge method before merging:

- ConfirmDialog.svelte: add SelectMenu support and a select field to confirm requests.
- ReviewCenter.svelte: fetch integration merge options, show a merge-method selector in the merge confirmation, and pass the chosen method to the review action.
- Update types and git bindings to surface IntegrationMergeOptions / IntegrationMergeMethod and the getIntegrationReviewMergeOptions call (git.ts / types.ts changes staged).

Effect: users can pick a merge method appropriate to the provider/project; the integration layer generates the correct API payload per provider. Tests added for merge logic.
2026-09-18 15:12:25 +02:00
Christoph 19eacd2e9f fix(theme): set concrete status colors and increase avatar accent tint
Replace self-referential CSS variables with explicit hex values for status tokens (--color-sync-ahead, --color-success, --color-warning) and change --color-on-status to white. This makes the theme colors deterministic (avoids circular var() references) and ensures consistent contrast.

Also increase the accent mix used for avatar backgrounds in the review center from 35% to 45% so avatars have a stronger accent tint.
2026-09-18 10:57:46 +02:00
Christoph 7ee02e8652 refactor(theme): centralize status colors and overlay tints in CSS vars
Introduce semantic theme variables (e.g. --color-success, --color-danger,
--color-warning, --color-info) and a set of overlay/tint/shadow variables
(--app-hover-tint, --app-raise-tint, --app-soft-tint, --app-overlay-shadow,
--app-menu-shadow, --app-float-shadow, etc.) and use them throughout
app.css in place of many hard-coded color, background and shadow values.

This change:
- replaces literal color tokens used for badges, pills, buttons, menus,
  toasts, borders and file icons with the new semantic variables
- switches several box-shadow and overlay usages to the new shadow vars
- harmonizes light-theme surface, border and scrollbar values to explicit
  variables for easier maintenance

No structural or behavioral changes; this is purely a visual/theming
refactor to make future theme adjustments and dark/light parity simpler.
2026-09-18 10:50:32 +02:00
Christoph af1c70d45d feat(review-center): add repository filter and SelectMenu option meta/icon
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.
2026-09-17 23:08:06 +02:00
Christoph 3e87c8f6a9 feat(confirm): centralize confirmation dialogs and add i18n
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.
2026-09-17 21:41:35 +02:00
Christoph d26d2ac982 refactor(dialogs): add unified dialog header chrome and opt-in markup
Introduce a shared dialog header style (.unified-dialog-header) in app.css and opt dialog components into the new chrome by updating their header markup. Headers now use unified-dialog-icon and unified-dialog-text elements (and import the matching Lucide icons where needed), which standardizes icon placement, title/eyebrow layout, close button styling and responsive behavior. The Command Palette layout was adjusted to include the new header and its grid rows.

The CSS is explicitly opt-in (so page/section headers remain unchanged) and includes hover/focus styles and a theme-sensitive close color variable. This commit is a UI refactor only — no API or behavior logic changes.
2026-09-11 22:50:31 +02:00
Christoph 4b5de5a88b feat(ai): generate PR drafts and consolidate AI settings UI
Add pull request draft generation to the commit_ai crate and expose it
via a new Tauri command. The backend builds a branch-range context from
published remote-tracking refs only, calls the chosen AI provider, and
parses a JSON {"title","description"} draft (with validation). Also
register the command in the app and add unit tests for parsing and the
branch-context behavior.

Consolidate AI settings in the frontend by renaming the dialog to an
AiSettingsPage and integrating AI options into the main AppSettings
dialog. Persisted AI preferences are merged with existing localStorage
rather than replacing it, and the settings UI now supports opening the
app settings to a specific initial page ("integrations" or "ai").

Other changes:
- Replace the commit-message system prompt used by build_messages with
  the updated, more detailed guidance text.
2026-09-11 22:34:21 +02:00
Christoph d0dd79354a feat(integrations): add Azure work item state management and UI tweaks
Add support for listing and setting Azure DevOps work item states from the
integration layer. New helpers build and validate JSON-patch payloads and
expose two Tauri commands so the frontend can enumerate available states
and apply state changes. The Issue Center now loads Azure states and can
change an issue's state; dialog dismiss controls and related CSS were
consolidated and board UI feedback was simplified for clarity.

- Add Tauri commands to list and set Azure work item states.
- Load and present Azure states in Issue Center and allow state changes.
- Unify dialog dismiss attributes and refine hover/focus styling.
2026-09-11 08:43:06 +02:00
Christoph 95c72340fe feat(ui): add consistent page-header layout and styles
publish / Build and publish Ubuntu AppImage (release) Successful in 9m27s
publish / Build and publish Windows installer (release) Successful in 10m56s
publish / Build and publish AUR packages (release) Successful in 19m46s
Introduce a shared page-header/page-heading pattern and CSS to
standardize headers across top-level sections. Components were
updated to adopt the new classes and slightly smaller icon sizing
for a more compact, consistent header appearance. This improves
visual consistency and makes future header adjustments simpler.

- Add reusable page-header styles for spacing, borders, and bg
- Standardize icon sizing and heading layout across screens
2026-09-09 09:24:18 +02:00
Christoph abbd737a8d feat(ui): refine integration board view and compact assignees
Refactor the integration board UI to improve board discovery, loading,
and the card detail experience. Introduce a compact assignee mode and
apply it in list views to save horizontal space, and make several
accessibility and labeling improvements for board links and authors.

- Add a compact prop for assignee rendering and use it across lists.
- Improve board URL handling and add Azure DevOps board label parsing.
- Replace the old inspector with a focused detail drawer and sidebar.
2026-09-09 08:45:55 +02:00
Christoph 200f01185a feat(review): add integration review APIs and adjust UI
Add client-side wrappers for creating integration review requests and
for listing repository branches, and wire native command imports so the
app can call those integration endpoints. Update the review center UI to
include a create-review dialog import and refine table and provider
button layout for improved spacing and readability.

- Add wrappers for create review requests and branch listing
- Wire native integration imports and prepare the create-review dialog
- Adjust table sizing and provider button layout for better spacing
2026-09-08 22:00:08 +02:00
Christoph Brandau cd224fcc55 Merge remote-tracking branch 'origin/main' into issue-center
# Conflicts:
#	src-tauri/src/main.rs
#	src/lib/components/ReviewCenter.svelte
#	src/lib/git.ts
2026-09-08 21:55:51 +02:00
Christoph b7a5bfe29f style(review-center): improve responsive table and toolbar layout
Adjust CSS to make the review center more robust at mid and narrow
viewports. This increases several min-width thresholds, tweaks grid
column sizing and padding, and refines toolbar/button sizing to avoid
content wrapping and truncated actions. The result keeps lists and
controls visible and aligned across a wider range of window sizes.

- Raise table/group min-widths and adjust column widths to prevent wrap
- Increase provider button min-width and disable shrinking for clarity
2026-09-08 21:49:29 +02:00
Christoph ee35169feb feat(create-review): load repository branches and suggest local branch
Add a backend command to enumerate a repository's branches and default
branch for configured integrations, and expose it to the UI. The create
review dialog now fetches branches, shows loading and error states, and
uses searchable SelectMenu controls for repositories and branches. If a
local repository path is available the dialog will try to match remotes
and preselect a local branch that exists on the remote to streamline
review creation.

- Add integration branch listing command and wire it into the dialog
- Replace plain selects with searchable SelectMenu and improved UX
- Attempt to detect and suggest a matching local source branch when possible
2026-09-08 21:41:29 +02:00
Christoph f7f85d387d feat(integrations): add create integration review request API and UI
Add a new Tauri command and front-end flow to create PRs/MRs.
The backend builds and validates provider-specific payloads and
endpoints, sends creation requests, and parses responses into the
app's review model. A Svelte dialog and a JS wrapper wire the UI to the
command so users can create requests from the Review Center.

- Implement provider payload and endpoint logic with unit tests
- Expose create_integration_review_request as a Tauri command
- Add CreateReviewDialog UI and integrate a creation button in Review Center
2026-09-08 21:32:12 +02:00
Christoph 0539020545 feat(integrations): add multi-provider board and issue integrations
Add backend integration modules to discover, read, and modify
provider-hosted boards, issues, and comments across multiple providers.
Expose Tauri commands for board discovery, listing, and card moves,
and implement safe issue actions and comment APIs.
Wire new Svelte UI components to render boards, issue centers,
comments, labels, and assignees, and add sanitized markdown rendering.

- Add board discovery, board reading, and card-move APIs
- Add Svelte components and styles for integrated board UI
- Use marked + DOMPurify for safe markdown rendering
2026-09-08 21:19:54 +02:00
Christoph f607c6b5cf feat(review-center): enhance detail panel, actions, and search
Refactor the Review Center component to improve layout, accessibility,
and user flow. Add a SelectMenu integration picker and reorganize state
tabs and search into a cleaner toolbar. Bind the detail panel, close it
on outside pointer events, and introduce richer merge/conflict UI with a
local-resolution flow plus comment formatting helpers and action tweaks.

- Add SelectMenu for integration selection and cleaner toolbar layout
- Bind detail panel, handle outside-click closing, and focus helpers
- Improve conflict/merge presentation and action menu behaviors
2026-09-07 21:42:39 +02:00
Christoph 13660c801e feat(review): auto-continue merge and poll provider after push
Coordinate local conflict resolutions with automated push and provider-
side merge status checks. When a local resolution completes the app
advances the merge workflow, pushes the updated branch, and attempts to
continue the merge. The UI shows a checking state and disables relevant
actions while the provider rechecks to prevent duplicate operations.
This streamlines finishing conflict resolution and keeps PR status in
sync with remote providers.

- Automatically push and continue merge when local resolutions finish
- Poll provider for updated mergeability and refresh request details
- Add guards to disable UI actions while waiting for remote status
2026-09-07 18:54:06 +02:00
Christoph c46a875a91 feat(review-center): add local pull-request conflict resolution flow
Add a local conflict resolution workflow that allows resolving PR
merge conflicts from the review center. The change implements host and
repository matching, prepares and merges branches locally, opens the
resolve editor, and tracks a multi-phase state machine to continue,
abort, or push the resolved branch back to the remote.

- Core resolution logic to locate matching repos, prepare merges,
  and manage phases (preparing → conflicts → ready-to-push → complete).
- UI wiring and callbacks to start, reopen, continue, abort, and push
  local resolutions from the review center.
- Helpers to open the conflict editor, monitor merge state, and mark
  completion after a successful push.
2026-09-07 17:33:54 +02:00
Christoph c6553218a2 feat(dashboard): show PR badges and deep-link to Review Center
Add pull request badges to the repository dashboard and enable deep-
linking to the Review Center with a repository and source pre-filter.
Badges are populated by resolving remotes, matching them to configured
integration sources, and querying providers for open PRs while handling
loading, error, and unavailable states. The dashboard badge opens the
Review Center pre-filled and the app stores initial query/source values
to support the deep-link.

- Resolve and normalize remotes to match integration sources reliably.
- Query provider APIs using stored credentials with sensible timeouts.
- Expose a badge action that navigates to the Review Center pre-filtered.
2026-09-07 16:19:26 +02:00
Christoph a55a3ca300 feat(integrations): add review fetching and Linux keyring support
Add a cross-provider Review Center and improve credential handling.
Backend integrations fetch and normalize PRs from GitHub, GitLab,
Gitea, and Azure DevOps with improved timeouts and parsing. Credentials
now use a global lock and support secret-tool on Linux to avoid races.

- Normalize review data across providers (GitHub/GitLab/Gitea/Azure)
- Serialize credential access with OnceLock and use secret-tool on Linux
- Add frontend ReviewCenter component and related UI updates
2026-09-06 22:53:44 +02:00