feat: workspaces own their sessions; desktop parity; sidebar and settings cleanup

Workspace sessions (docs/plans/desktop-parity, phases 1-5 and 7):
- sessions.lane_id: a workspace lists only the sessions its panes held,
  stamped by bindRunSession (first writer wins, nested `claude -p`
  excluded); GET /api/sessions?lane=&archived=
- session row state dot, double-click rename, archive (sessions.archived_at,
  hides only); the activity bar's duplicate Sessions tab removed
- Fork beside Resume (--fork-session, Claude only), Ctrl/Cmd+click a live
  session opens it in a second pane, a diff line's comment is pasted into
  the workspace's last-focused pane (lib/panePaste.ts)

dashboard_runs stability:
- a pane's previous run is archived as <pane>@<started_at> instead of being
  overwritten by INSERT OR REPLACE
- a run is flagged abandoned only once its tmux session is gone, at boot and
  on the run-heal beat (panes outlive a server restart)

UI:
- sidebar: no footer, language or theme block; small collapse button in the
  brand corner; version + update check in the connection details modal, a
  status-bar dot while a release is out; language in Settings -> General
- one Switch component for every switch, the themed Checkbox for every
  checkbox (no native checkboxes)

Also: AI Tools catalog trimmed to 10 built-ins (custom-file prompt modes
tested through fixtures), and the workspace plans under docs/plans/ (the
multi-user server plan lives in the AgentHub-Server repo).
This commit is contained in:
2026-10-02 12:05:00 +07:00
parent 5b269698f6
commit a6bd33bcff
121 changed files with 2699 additions and 1552 deletions
+25 -7
View File
@@ -74,26 +74,44 @@ export interface CheckboxProps {
className?: string;
/** Classes applied to the label `<span>` when `label` is set. */
labelClassName?: string;
/** `danger` / `warning` for an opt-in that makes an action riskier
* (bypass permissions, purge data, force). */
tone?: "accent" | "danger" | "warning";
disabled?: boolean;
}
const TONE = {
accent: "bg-accent border-accent",
danger: "bg-status-danger border-status-danger",
warning: "bg-status-warning border-status-warning",
} as const;
/**
* Themed checkbox control.
* Themed checkbox control — the app's ONE checkbox; never a native
* `<input type="checkbox">`, which renders as the browser's white box.
* @param props See {@link CheckboxProps}.
*/
export function Checkbox({ checked, onChange, label, className, labelClassName }: CheckboxProps) {
export function Checkbox({
checked,
onChange,
label,
className,
labelClassName,
tone = "accent",
disabled = false,
}: CheckboxProps) {
return (
<button
type="button"
role="checkbox"
aria-checked={checked}
disabled={disabled}
onClick={() => onChange(!checked)}
className={`group inline-flex items-center gap-2 text-left ${className ?? ""}`}
className={`group inline-flex items-center gap-2 text-left disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none ${className ?? ""}`}
>
<span
className={`flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors ${
checked
? "bg-accent border-accent"
: "bg-surface-2 border-border group-hover:border-border-light"
className={`flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors group-focus-visible:ring-2 group-focus-visible:ring-accent/40 ${
checked ? TONE[tone] : "bg-surface-2 border-border group-hover:border-border-light"
}`}
>
{checked && <Check className="h-3 w-3 text-white" strokeWidth={3} />}