Add embedded PTY terminal, keyboard shortcuts, and assignee/label integrations #53

Merged
Christoph merged 9 commits from UI-UX into main 2026-09-22 19:13:07 +00:00
Owner

This change adds an embedded, PTY-backed terminal dock, several new keyboard shortcuts for navigation and status selection, and integration support for labels and assignees. It also makes a few UI fixes and swaps the Create Issue description field for the richer comment editor. The diffs show new frontend and backend dependencies (xterm on the renderer side and portable-pty in the Tauri backend), exports for integration APIs, and a new implementation for listing/assigning assignees.

Key behavior changes

  • Embedded terminal dock

    • A terminal is embedded in the repository view, docked above the status bar and resizable in height. It runs a real pseudo-terminal using the user's shell (portable-pty on the Rust/Tauri side and xterm on the frontend). Each repository tab keeps its own PTY session and Ctrl+toggles the dock. The implementation adds@xterm/xtermand@xterm/addon-fitto JS deps andportable-pty = "0.9"tosrc-tauri/Cargo.toml`.
  • Keyboard shortcuts

    • Ctrl/Cmd+1..4 switch the main views (Dashboard, Repositories, Pull Requests, Issues & Boards).
    • Ctrl/Cmd+A selects all files in the focused status lane; Esc clears the selection.
  • Integrations: labels and assignees

    • Exposes integration helpers and an IntegrationApi wrapper for HTTP interaction with providers. Adds provider-specific handling to list and manipulate assignees and assignment targets (new Tauri commands, new integrations/assignees.rs, and src-tauri/src/integrations.rs now re-exports labels and assignees).
  • Create Issue dialog

    • The description field in the Create Issue dialog now uses the full CommentEditor instead of a plain textarea.
  • UI fixes and small changes

    • Long file paths no longer displace header controls in the file history dialog.
    • Localized selection count and stage/unstage button labels were added for the status view.
    • The help overlay no longer includes a changelog/What's new section and removes an unused Sparkles icon.
    • CHANGELOG.md updated with an Unreleased section describing the visible user-facing changes.

Implementation notes (high level)

  • Frontend: package.json and package-lock.json were updated to include @xterm/xterm and @xterm/addon-fit.
  • Backend (Tauri): src-tauri/Cargo.toml adds portable-pty = "0.9" and src-tauri/Cargo.lock includes the transitive crates required for PTY support. New Tauri commands and integration helpers are added under src-tauri/src/integrations.

Testing

No test execution results were provided.

Recommended focused checks for reviewers

  1. Build and install new dependencies

    • Install JS deps (npm/yarn/pnpm depending on your workflow):

      npm install

    • Build the Tauri backend so Rust deps (portable-pty) are fetched and compiled:

      cargo build --manifest-path src-tauri/Cargo.toml

    Note: portable-pty and its transitive crates introduce native/platform-specific components; a working Rust toolchain and platform build tools are required.

  2. Runtime checks

    • Repository view: open a repository tab, toggle the terminal dock (Ctrl+`). Verify the terminal runs an interactive shell (tab completion, Ctrl+C behavior) and that resizing and per-tab sessions behave as expected.
    • Shortcuts: confirm Ctrl/Cmd+1..4 switch main views and that Ctrl/Cmd+A selects all files in a focused status lane and Esc clears the selection.
    • Create Issue: open the Create Issue dialog and confirm the description field uses the comment editor (rich editor controls present).
    • Integrations: with a configured provider (e.g. GitHub/GitLab/Azure/Gitea), exercise listing assignees/labels via the UI paths that surface them; if needed, invoke the new Tauri command list_integration_assignees to validate provider responses.

Compatibility / reviewer actions

  • Run the JS package manager install to pick up @xterm/xterm and @xterm/addon-fit.
  • Build the Tauri backend (cargo) to pull in portable-pty and its native dependencies.
  • Expect larger native build times and additional native toolchain requirements because of the PTY support.

Risks and notes

  • Adding PTY support (portable-pty) and native crates may require platform-specific toolchains and can increase binary size and build time; verify CI or local build environments can compile these crates.
  • The changelog was updated to include an Unreleased section describing user-visible changes.

If you'd like, I can add a short checklist of integration-specific manual tests to validate each provider (GitHub/GitLab/Gitea/Azure) against their assignment endpoints.

This change adds an embedded, PTY-backed terminal dock, several new keyboard shortcuts for navigation and status selection, and integration support for labels and assignees. It also makes a few UI fixes and swaps the Create Issue description field for the richer comment editor. The diffs show new frontend and backend dependencies (xterm on the renderer side and portable-pty in the Tauri backend), exports for integration APIs, and a new implementation for listing/assigning assignees. Key behavior changes - Embedded terminal dock - A terminal is embedded in the repository view, docked above the status bar and resizable in height. It runs a real pseudo-terminal using the user's shell (portable-pty on the Rust/Tauri side and xterm on the frontend). Each repository tab keeps its own PTY session and Ctrl+` toggles the dock. The implementation adds `@xterm/xterm` and `@xterm/addon-fit` to JS deps and `portable-pty = "0.9"` to `src-tauri/Cargo.toml`. - Keyboard shortcuts - Ctrl/Cmd+1..4 switch the main views (Dashboard, Repositories, Pull Requests, Issues & Boards). - Ctrl/Cmd+A selects all files in the focused status lane; Esc clears the selection. - Integrations: labels and assignees - Exposes integration helpers and an `IntegrationApi` wrapper for HTTP interaction with providers. Adds provider-specific handling to list and manipulate assignees and assignment targets (new Tauri commands, new `integrations/assignees.rs`, and `src-tauri/src/integrations.rs` now re-exports labels and assignees). - Create Issue dialog - The description field in the Create Issue dialog now uses the full `CommentEditor` instead of a plain textarea. - UI fixes and small changes - Long file paths no longer displace header controls in the file history dialog. - Localized selection count and stage/unstage button labels were added for the status view. - The help overlay no longer includes a changelog/What's new section and removes an unused Sparkles icon. - `CHANGELOG.md` updated with an Unreleased section describing the visible user-facing changes. Implementation notes (high level) - Frontend: `package.json` and `package-lock.json` were updated to include `@xterm/xterm` and `@xterm/addon-fit`. - Backend (Tauri): `src-tauri/Cargo.toml` adds `portable-pty = "0.9"` and `src-tauri/Cargo.lock` includes the transitive crates required for PTY support. New Tauri commands and integration helpers are added under `src-tauri/src/integrations`. Testing No test execution results were provided. Recommended focused checks for reviewers 1. Build and install new dependencies - Install JS deps (npm/yarn/pnpm depending on your workflow): npm install - Build the Tauri backend so Rust deps (portable-pty) are fetched and compiled: cargo build --manifest-path src-tauri/Cargo.toml Note: portable-pty and its transitive crates introduce native/platform-specific components; a working Rust toolchain and platform build tools are required. 2. Runtime checks - Repository view: open a repository tab, toggle the terminal dock (Ctrl+`). Verify the terminal runs an interactive shell (tab completion, Ctrl+C behavior) and that resizing and per-tab sessions behave as expected. - Shortcuts: confirm Ctrl/Cmd+1..4 switch main views and that Ctrl/Cmd+A selects all files in a focused status lane and Esc clears the selection. - Create Issue: open the Create Issue dialog and confirm the description field uses the comment editor (rich editor controls present). - Integrations: with a configured provider (e.g. GitHub/GitLab/Azure/Gitea), exercise listing assignees/labels via the UI paths that surface them; if needed, invoke the new Tauri command `list_integration_assignees` to validate provider responses. Compatibility / reviewer actions - Run the JS package manager install to pick up `@xterm/xterm` and `@xterm/addon-fit`. - Build the Tauri backend (cargo) to pull in `portable-pty` and its native dependencies. - Expect larger native build times and additional native toolchain requirements because of the PTY support. Risks and notes - Adding PTY support (portable-pty) and native crates may require platform-specific toolchains and can increase binary size and build time; verify CI or local build environments can compile these crates. - The changelog was updated to include an Unreleased section describing user-visible changes. If you'd like, I can add a short checklist of integration-specific manual tests to validate each provider (GitHub/GitLab/Gitea/Azure) against their assignment endpoints.
Christoph added 9 commits 2026-09-22 19:12:30 +00:00
Replace the simple <textarea> with the CommentEditor component (imported at
top) and bind description to it. Pass locale-aware props (language,
ariaLabel, previewLabel, placeholder) and keep disabled/rows bindings so the
dialog behavior is unchanged.

Also adjust styles to remove textarea-specific rules (resize/line-height and
focus handling) and update the selector sets to reflect the component change.
Add a new integrations/assignees backend (src-tauri/src/integrations/assignees.rs)
and expose commands to list, read and set assignees:
- list_integration_assignees
- get_integration_assignees
- set_integration_assignees

Introduce IntegrationAssignee and AssignmentTarget types and provider-specific
URL/payload logic (GitHub, Gitea, GitLab / self-hosted, Azure DevOps). The code
handles pagination, provider quirks (Gitea legacy fields, GitLab assignee_ids,
Azure reviewer vs work-item differences) and validates/verifies assignments.
Unit tests cover routing and payload behavior.

Add UI components AssigneePicker.svelte and AssignmentEditor.svelte and update
CreateIssueDialog, CreateReviewDialog, IssueCenter, ReviewCenter, git types and
git.ts to use the new assignment functionality.
Add a new labels integration (src-tauri/src/integrations/labels.rs) that implements listing,
reading and updating issue labels for multiple providers (GitHub, Gitea, GitLab and Azure
DevOps). The new module provides Tauri commands:
- list_integration_labels
- get_integration_issue_labels
- set_integration_issue_labels

Refactor assignees integration to make core HTTP helpers reusable:
- Rename AssignmentApi -> IntegrationApi and make its fields/methods pub(super).
- Make helper functions api_url, repository_parts and target_url pub(super) so labels.rs
  can construct and call provider endpoints.
- Adjust wording of a few error messages (e.g. "Assignment request..." -> "Integration request...")
  and genericize some page/result error text.

Export the new labels module from integrations.rs and relax test helper visibility
(pub(crate)) so the labels tests can reuse the existing fixture utilities.

This commit introduces provider-specific parsing and payload logic for labels and
reuses the shared IntegrationApi to perform authenticated requests.
Constrain the dialog header/body layout so very long file paths don't push
or wrap the dialog controls. Results: the title is truncated with an
ellipsis but the full name is available on hover.

- CSS: add grid-template-columns and min-width:0 to dialog/body; force
  unified-dialog-header to avoid wrapping and set unified-dialog-text
  flex-basis:0; truncate h2 with overflow/ellipsis.
- Svelte: add a title attribute to the h2 so the full filename is shown
  on hover.
Make status lanes keyboard-manageable and add select-all / clear-selection shortcuts.

- Implement Ctrl/Cmd+A to select every file in the focused status lane (unstaged or staged),
  setting the selection set and anchor. The handler ignores events from inputs/contenteditable
  and respects modifier keys.
- Make Escape back out one step: close an open status context menu first; if none, clear the
  current multi-selection. Escape does not call preventDefault so overlays/dialogs can still close.
- Allow clicking a lane to receive focus (tabindex="-1" + pointerdown handler) and add a focused
  visual treatment in CSS. Add a title/hint and update the help center text and i18n messages.
Add keyboard shortcuts (Ctrl/Cmd + 1–4) to jump to the four main views:
Dashboard, Repositories, Pull Requests and Issues & Boards.

- Handler runs in the capture phase so editors/dialogs can still trap keys.
- Switching is blocked when the app is busy or any modal/overlay is open; repeats
  and combinations with Alt/Shift are ignored.
- When switching to the repository view the shortcut selects an existing repo
  tab (it will not open a native file dialog if no repo is available).

Also update tab button titles to surface the shortcuts and add entries to the
help overlay (English and German).
Remove the large static "changelog" entries previously spliced into enCategories and deCategories in HelpOverlay.svelte, and drop the now-unused Sparkles import from @lucide/svelte.

Before: the help overlay injected a multi-version "What's new / Neu in Gitty" category with many release notes.
After: that category and its content are no longer added, and the unused icon import is removed (reduces clutter/unused code).
Replace hard-coded "X selected" and "Stage/Unstage X" labels in the status panel
with i18n lookups. Adds three message keys with English and German texts:
- status.selectionCount
- status.stageCount
- status.unstageCount

StatusPanel.svelte now uses t(...) with the count for the selection badge and the
stage/unstage action buttons. CHANGELOG.md was also updated (Unreleased and
recent release entries).
Adds a built-in terminal dock that runs a real pseudo-terminal per repository tab.

- Backend: new src-tauri/src/terminal.rs implements TerminalState and Tauri commands
  terminal_open, terminal_write, terminal_resize and terminal_close using the
  portable-pty crate. Terminal output is emitted via "terminal:data" and exits
  via "terminal:exit". Includes unit tests for UTF-8 chunk handling. Cargo.toml
  updated to depend on portable-pty and main.rs registers the state/commands.
- Frontend: App.svelte/UI and app.css updated to show a resizable terminal dock,
  toggleable with Ctrl+` and persisted open/height state. TerminalPanel.svelte is
  lazy-loaded per repo tab (frontend provides session ids like repo:<path>).
  package.json adds @xterm/xterm and @xterm/addon-fit for the frontend terminal
  surface.
- Docs: CHANGELOG.md notes the new embedded terminal feature.

Behavior: each repository tab has its own PTY-backed shell started in the repo
cwd; the user's shell (SHELL/COMSPEC) is used so prompts, aliases and interactive
behavior work as in a normal terminal.
Christoph merged commit fe80f1fd11 into main 2026-09-22 19:13:07 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Christoph/GitLite#53