Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(agentic-ide): workspace settings, drop targets, and account wiring in the UI
Ruben Lütke5f0be1849050
diff --git a/jarvis/ui/web/frontend/src/components/AgentAccountsPanel.tsx b/jarvis/ui/web/frontend/src/components/AgentAccountsPanel.tsxindex a94ac843a1..2f2cc31fd1 100644--- a/jarvis/ui/web/frontend/src/components/AgentAccountsPanel.tsx+++ b/jarvis/ui/web/frontend/src/components/AgentAccountsPanel.tsx@@ -54,7 +54,28 @@ const PLATFORM_LABEL: Record<AccountPlatform, string> = {const PLATFORMS: AccountPlatform[] = ["claude", "codex"];-export function AgentAccountsPanel() {+/** How the switch is applied — see `onActivate`. */+type Activate = (+ platform: AccountPlatform,+ accountId: string,+) => Promise<AgentAccountsResponse | void>;++interface AgentAccountsPanelProps {+ /**+ * Applies the switch. Defaults to the stored-default route, which is what the+ * Settings page means by it.+ *+ * The Agentic IDE passes its own so the open workspace learns about the+ * change in the same round-trip — one panel, one behaviour, two places it can+ * be reached from. Anything it returns replaces the list; returning nothing+ * makes the panel re-read it.+ */+ onActivate?: Activate;+ /** One extra line under the description, e.g. where the switch takes effect. */+ note?: string;+}++export function AgentAccountsPanel({ onActivate, note }: AgentAccountsPanelProps = {}) {const t = useT();const pushToast = useEventStore((s) => s.pushToast);const [data, setData] = useState<AgentAccountsResponse | null>(null);@@ -106,6 +127,11 @@ export function AgentAccountsPanel() {<p className="px-1 text-[11px] leading-relaxed text-muted-foreground">{t("agent_accounts.description")}</p>+ {note && (+ <p className="px-1 text-[11px] leading-relaxed text-muted-foreground">+ {note}+ </p>+ )}{error && (<p className="px-1 text-[11px] text-amber-600" role="alert">@@ -121,6 +147,7 @@ export function AgentAccountsPanel() {group={groupFor(data, platform)}busy={busy}run={run}+ activate={onActivate ?? setActiveAgentAccount}/>))}</div>@@ -133,11 +160,13 @@ function PlatformCard({group,busy,run,+ activate,}: {platform: AccountPlatform;group: ReturnType<typeof groupFor>;busy: string | null;run: (key: string, action: () => Promise<AgentAccountsResponse | void>) => Promise<void>;+ activate: Activate;}) {const t = useT();const [adding, setAdding] = useState(false);@@ -175,6 +204,7 @@ function PlatformCard({active={account.id === activeId}busy={busy}run={run}+ activate={activate}/>))}{accounts.length === 0 && (@@ -233,11 +263,13 @@ function AccountRow({active,busy,run,+ activate,}: {account: AgentAccount;active: boolean;busy: string | null;run: (key: string, action: () => Promise<AgentAccountsResponse | void>) => Promise<void>;+ activate: Activate;}) {const t = useT();const pushToast = useEventStore((s) => s.pushToast);@@ -245,11 +277,9 @@ function AccountRow({const [draft, setDraft] = useState(account.label);const pending = busy?.endsWith(account.id) ?? false;- async function activate() {+ async function use() {if (active) return;- await run(`active:${account.id}`, () =>- setActiveAgentAccount(account.platform, account.id),- );+ await run(`active:${account.id}`, () => activate(account.platform, account.id));}async function signIn() {@@ -281,7 +311,7 @@ function AccountRow({<div className="flex items-center gap-2"><buttontype="button"- onClick={() => void activate()}+ onClick={() => void use()}disabled={active || pending}aria-pressed={active}aria-label={`${t("agent_accounts.use_account")}: ${account.label}`}@@ -371,8 +401,8 @@ function AccountRow({<span className="min-w-0 break-words">{account.message}</span></p>- {/* Two accounts on ONE subscription look completely healthy — both rows- green, both naming a valid plan — and the only symptom is usage+ {/* Two accounts on ONE subscription look completely healthy — both rows+ green, both naming a valid plan — and the only symptom is usagedraining twice as fast. So it is said out loud, next to the row thatduplicates another, rather than left to be deduced from a usage page. */}{account.warning && (diff --git a/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.test.tsxindex 95f3608ce8..f43ae69618 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.test.tsx@@ -63,3 +63,79 @@ describe("PromptPreview", () => {expect(screen.getByText("jarvis/rank.py")).toBeTruthy();});});++/*+ * The dropped-file panel answers one question the prompt text cannot: was the+ * picture actually LOOKED at? On an install whose providers are all text-only+ * it was not, and the user has to be able to see that before the agent starts+ * rather than after it asks what the screenshot showed.+ */+describe("PromptPreview attachments", () => {+ const described = {+ name: "shot.png",+ reference: "@.jarvis/drops/shot.png",+ kind: "image" as const,+ detail: "A login dialog whose submit button overflows its container.",+ described_by: "vision" as const,+ note: "",+ };++ const undescribed = {+ name: "photo.png",+ reference: "@photo.png",+ kind: "image" as const,+ detail: "",+ described_by: "none" as const,+ note: "No provider that can see images is reachable.",+ };++ it("shows nothing at all when nothing was dropped", () => {+ render(<PromptPreview {...base} />);+ expect(screen.queryByTestId("prompt-preview-attachments")).toBeNull();+ });++ it("shows what was read out of a dropped screenshot", () => {+ render(<PromptPreview {...base} attachments={[described]} />);+ const panel = screen.getByTestId("prompt-preview-attachments");+ expect(panel.textContent).toContain("shot.png");+ expect(panel.textContent).toContain("submit button overflows");+ expect(panel.textContent).toContain("described");+ });++ it("says plainly when the image could NOT be described", () => {+ render(<PromptPreview {...base} attachments={[undescribed]} />);+ const panel = screen.getByTestId("prompt-preview-attachments");+ expect(panel.textContent).toContain("attached as a file only");+ // The reason travels with it — "it did not work" without a why is not an+ // answer the user can act on.+ expect(panel.textContent).toContain("No provider that can see images");+ });++ it("distinguishes an extracted document from a described image", () => {+ render(+ <PromptPreview+ {...base}+ attachments={[+ {+ name: "spec.md",+ reference: '"spec.md"',+ kind: "text" as const,+ detail: "The endpoint must return 202.",+ described_by: "extraction" as const,+ note: "",+ },+ ]}+ />,+ );+ const panel = screen.getByTestId("prompt-preview-attachments");+ expect(panel.textContent).toContain("text read");+ expect(panel.textContent).toContain("must return 202");+ });++ it("lists every dropped file rather than only the first", () => {+ render(<PromptPreview {...base} attachments={[described, undescribed]} />);+ const panel = screen.getByTestId("prompt-preview-attachments");+ expect(panel.textContent).toContain("shot.png");+ expect(panel.textContent).toContain("photo.png");+ });+});diff --git a/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.tsx b/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.tsxindex fbb6b87b6c..7819de428f 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PromptPreview.tsx@@ -1,5 +1,6 @@import { useEffect } from "react";-import { FileCode2, Send, Type, X } from "lucide-react";+import { FileCode2, Image as ImageIcon, Paperclip, Send, Type, X } from "lucide-react";+import type { DropAttachment } from "@/lib/agenticIdeApi";/*** The composed prompt, shown for approval before it is typed into an agent.@@ -23,6 +24,8 @@ export interface PromptPreviewProps {files: string[];/** Which layer produced it — `llm` is the full path. */composedBy: "llm" | "fallback" | "raw";+ /** Files dropped with the instruction, and what was read out of them. */+ attachments?: DropAttachment[];onSend: () => void;onSendVerbatim: () => void;onCancel: () => void;@@ -33,6 +36,7 @@ export function PromptPreview({composed,files,composedBy,+ attachments = [],onSend,onSendVerbatim,onCancel,@@ -85,6 +89,51 @@ export function PromptPreview({</div>)}+ {/*+ What was read out of the dropped files, shown as itself.++ The description is already folded into the prompt above, so this is not+ a second copy of the content — it is the answer to the one question the+ prompt text cannot settle: did the picture actually get looked at? On an+ install with no vision-capable provider it did not, the brief was+ written without it, and the user needs to see that BEFORE the agent+ starts rather than after it asks what the screenshot showed.+ */}+ {attachments.length > 0 && (+ <div className="mt-2" data-testid="prompt-preview-attachments">+ {attachments.map((item) => {+ const read = item.described_by !== "none" && item.detail.length > 0;+ return (+ <details+ key={item.name}+ className="mt-1 rounded-md border border-border bg-background/40 px-2 py-1.5"+ >+ <summary className="flex cursor-pointer items-center gap-1.5 text-[11px] text-muted-foreground">+ {item.kind === "image" ? (+ <ImageIcon className="h-3 w-3 shrink-0" />+ ) : (+ <Paperclip className="h-3 w-3 shrink-0" />+ )}+ <span className="max-w-[14rem] truncate font-mono text-foreground">+ {item.name}+ </span>+ <span>+ {read+ ? item.described_by === "vision"+ ? "— described and included below"+ : "— text read and included"+ : "— attached as a file only"}+ </span>+ </summary>+ <p className="mt-1.5 max-h-40 overflow-y-auto whitespace-pre-wrap break-words text-[11px] leading-relaxed text-muted-foreground">+ {read ? item.detail : item.note || "Nothing could be read from this file."}+ </p>+ </details>+ );+ })}+ </div>+ )}+{/* Only ever shown when the full path did NOT run. The readback must notclaim more than happened, and neither must this. */}{composedBy !== "llm" && (diff --git a/jarvis/ui/web/frontend/src/components/agentic/ResumeCard.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/ResumeCard.test.tsxindex aa83e3341b..dab88fb3ac 100644--- a/jarvis/ui/web/frontend/src/components/agentic/ResumeCard.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/ResumeCard.test.tsx@@ -2,40 +2,51 @@ import { cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, describe, expect, it, vi } from "vitest";import { ResumeCard, resumeSummary, savedAgo } from "./ResumeCard";-import type { ResumeOffer } from "@/lib/agenticIdeApi";+import type {+ ResumeOffer,+ ResumeTerminalOffer,+ ResumeWorkspaceOffer,+} from "@/lib/agenticIdeApi";-const OFFER: ResumeOffer = {- available: true,+function pane(+ name: string,+ extra: Partial<ResumeTerminalOffer> = {},+): ResumeTerminalOffer {+ return {+ key: name.toLowerCase(),+ name,+ agent: "claude",+ display_name: "Claude Code",+ column: 0,+ slot: 0,+ available: true,+ resumable: true,+ prompts_sent: 1,+ ...extra,+ };+}++const WORKSPACE: ResumeWorkspaceOffer = {+ session_id: "ide_1",folder: "/home/ruben/code/project",folder_name: "project",+ name: "",folder_exists: true,+ available: true,+ resumable_count: 1,saved_at: 1_753_473_600,- session_id: "ide_1",+ in_last_session: true,+ terminals: [pane("Alex"), pane("Blake", { resumable: false, prompts_sent: 0 })],+};++const OFFER: ResumeOffer = {+ available: true,+ saved_at: 1_753_473_600,+ workspace_count: 1,+ terminal_count: 2,resumable_count: 1,- terminals: [- {- key: "mika",- name: "Mika",- agent: "claude",- display_name: "Claude Code",- column: 0,- slot: 0,- available: true,- resumable: true,- prompts_sent: 3,- },- {- key: "nova",- name: "Nova",- agent: "codex",- display_name: "Codex",- column: 1,- slot: 0,- available: true,- resumable: false,- prompts_sent: 0,- },- ],+ earlier_count: 0,+ workspaces: [WORKSPACE],};afterEach(cleanup);@@ -46,14 +57,35 @@ function button(testId: string): HTMLButtonElement {}describe("ResumeCard", () => {- it("names the workspace and every pane that comes back", () => {+ it("names the workspace and its panes", () => {render(<ResumeCard offer={OFFER} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,);expect(screen.getByText("project")).toBeTruthy();- expect(screen.getByText("Mika")).toBeTruthy();- expect(screen.getByText("Nova")).toBeTruthy();- expect(screen.getByText("Claude Code")).toBeTruthy();+ expect(screen.getByText("Alex")).toBeTruthy();+ expect(screen.getByText("Blake")).toBeTruthy();+ });++ it("lists EVERY workspace that was open, not just one", () => {+ const two: ResumeOffer = {+ ...OFFER,+ workspace_count: 2,+ terminal_count: 4,+ workspaces: [+ WORKSPACE,+ {+ ...WORKSPACE,+ session_id: "ide_2",+ folder: "/home/ruben/code/other",+ folder_name: "other",+ },+ ],+ };+ render(+ <ResumeCard offer={two} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,+ );+ expect(screen.getByTestId("resume-workspace-project")).toBeTruthy();+ expect(screen.getByTestId("resume-workspace-other")).toBeTruthy();});it("says which conversations will NOT come back, before the click", () => {@@ -63,8 +95,10 @@ describe("ResumeCard", () => {render(<ResumeCard offer={OFFER} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,);- expect(screen.getByTestId("resume-pane-nova").textContent).toMatch(/starts fresh/i);- expect(screen.getByTestId("resume-pane-mika").textContent).not.toMatch(+ expect(screen.getByTestId("resume-pane-blake").textContent).toMatch(+ /starts fresh/i,+ );+ expect(screen.getByTestId("resume-pane-alex").textContent).not.toMatch(/starts fresh/i,);});@@ -72,19 +106,37 @@ describe("ResumeCard", () => {it("marks a pane whose coding CLI is gone from this machine", () => {const offer: ResumeOffer = {...OFFER,- terminals: [- OFFER.terminals[0],- { ...OFFER.terminals[1], available: false },+ workspaces: [+ {+ ...WORKSPACE,+ terminals: [pane("Alex"), pane("Blake", { available: false })],+ },],};render(<ResumeCard offer={offer} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,);- expect(screen.getByTestId("resume-pane-nova").textContent).toMatch(+ expect(screen.getByTestId("resume-pane-blake").textContent).toMatch(/not installed here/i,);});+ it("summarises the call-signs once there are too many to read", () => {+ // A hundred chips is wallpaper, not information.+ const many = Array.from({ length: 30 }, (_, i) => pane(`T${i}`));+ const offer: ResumeOffer = {+ ...OFFER,+ terminal_count: 30,+ workspaces: [{ ...WORKSPACE, terminals: many, resumable_count: 30 }],+ };+ render(+ <ResumeCard offer={offer} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,+ );+ expect(screen.getByTestId("resume-pane-t0")).toBeTruthy();+ expect(screen.queryByTestId("resume-pane-t29")).toBeNull();+ expect(screen.getByTestId("resume-more-project").textContent).toMatch(/\+22 more/);+ });+it("resumes and dismisses through its two buttons", () => {const onResume = vi.fn();const onDismiss = vi.fn();@@ -102,21 +154,47 @@ describe("ResumeCard", () => {expect(onDismiss).toHaveBeenCalledTimes(1);});- it("cannot be resumed once its folder is gone", () => {- const gone: ResumeOffer = { ...OFFER, available: false, folder_exists: false };+ it("names the workspace whose folder is gone without hiding the others", () => {+ const offer: ResumeOffer = {+ ...OFFER,+ workspace_count: 2,+ terminal_count: 4,+ workspaces: [+ WORKSPACE,+ {+ ...WORKSPACE,+ session_id: "ide_2",+ folder: "/home/ruben/code/deleted",+ folder_name: "deleted",+ folder_exists: false,+ available: false,+ },+ ],+ };+ render(+ <ResumeCard offer={offer} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,+ );+ // The good one is still resumable, so the button stays usable.+ expect(button("resume-all").disabled).toBe(false);+ expect(screen.getByText(/moved or deleted/i)).toBeTruthy();+ });++ it("cannot be resumed when nothing at all can come back", () => {+ const gone: ResumeOffer = {+ ...OFFER,+ available: false,+ workspaces: [{ ...WORKSPACE, folder_exists: false, available: false }],+ };render(<ResumeCard offer={gone} busy={false} onResume={vi.fn()} onDismiss={vi.fn()} />,);expect(button("resume-all").disabled).toBe(true);- expect(screen.getByText(/moved or deleted/i)).toBeTruthy();// ...but "start fresh" still works, or the card could never be cleared away.expect(button("resume-dismiss").disabled).toBe(false);});it("locks both buttons while a resume is in flight", () => {- render(- <ResumeCard offer={OFFER} busy onResume={vi.fn()} onDismiss={vi.fn()} />,- );+ render(<ResumeCard offer={OFFER} busy onResume={vi.fn()} onDismiss={vi.fn()} />);expect(button("resume-all").disabled).toBe(true);expect(button("resume-dismiss").disabled).toBe(true);});@@ -124,23 +202,37 @@ describe("ResumeCard", () => {describe("resumeSummary", () => {it("distinguishes all, some and none", () => {- expect(resumeSummary({ ...OFFER, resumable_count: 2 })).toMatch(- /each continuing/i,- );+ expect(+ resumeSummary({ ...OFFER, resumable_count: 2 }),+ ).toMatch(/each continuing/i);expect(resumeSummary(OFFER)).toMatch(/1 continue/i);expect(resumeSummary({ ...OFFER, resumable_count: 0 })).toMatch(/none of their conversations/i,);});- it("leads with the reason nothing can be reopened", () => {- expect(resumeSummary({ ...OFFER, folder_exists: false })).toMatch(- /no longer on this machine/i,- );- expect(resumeSummary({ ...OFFER, available: false })).toMatch(- /not installed/i,+ it("counts folders as well as terminals", () => {+ expect(resumeSummary({ ...OFFER, workspace_count: 3, terminal_count: 9 })).toMatch(+ /3 folders, 9 terminals/,);});++ it("leads with the reason nothing can be reopened", () => {+ expect(+ resumeSummary({+ ...OFFER,+ available: false,+ workspaces: [{ ...WORKSPACE, folder_exists: false, available: false }],+ }),+ ).toMatch(/no longer on this machine/i);+ expect(+ resumeSummary({+ ...OFFER,+ available: false,+ workspaces: [{ ...WORKSPACE, available: false }],+ }),+ ).toMatch(/not installed/i);+ });});describe("savedAgo", () => {diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceBar.droptarget.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceBar.droptarget.test.tsxnew file mode 100644index 0000000000..0d66bf7445--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceBar.droptarget.test.tsx@@ -0,0 +1,156 @@+/**+ * Dropping a file on a workspace TAB.+ *+ * The tab is how a user addresses a project they are not currently looking at,+ * so the gesture has to name the workspace it landed on — dropping on "Website"+ * while the "Jarvis" grid is on screen must not quietly send the file to Jarvis.+ *+ * The other half is what the bar must NOT accept. A browser fires `dragenter`+ * for a stray text selection dragged by the mouse, and a tab that lights up for+ * one tells a user holding nothing that they can drop it here (BUG-110). Worse,+ * an unclaimed drop of a link NAVIGATES, which would replace the whole IDE and+ * every agent running in it.+ */+import { render, screen, fireEvent } from "@testing-library/react";+import { describe, expect, it, vi } from "vitest";+import { WorkspaceBar } from "./WorkspaceBar";+import type { WorkspaceCard } from "@/lib/agenticIdeApi";++function card(id: string, name: string): WorkspaceCard {+ return {+ id,+ folder: `C:/work/${name}`,+ name,+ branch: "main",+ terminals: 2,+ live_terminals: 2,+ focus_mode: false,+ created_at: 0,+ last_active_at: 0,+ active: false,+ };+}++const workspaces = [card("w1", "Jarvis"), card("w2", "Website")];++/** A DataTransfer stand-in — jsdom does not construct real ones. */+function transfer(types: string[], files: File[] = []) {+ return {+ types,+ files,+ items: [],+ dropEffect: "none",+ getData: (kind: string) =>+ kind === "text/uri-list" && files.length === 0 ? "file:///C:/shot.png" : "",+ } as unknown as DataTransfer;+}++const base = {+ workspaces,+ activeId: "w1",+ addingNew: false,+ maxWorkspaces: 6,+ onSelect: () => {},+ onAdd: () => {},+ onRename: async () => true,+ onClose: () => {},+};++describe("WorkspaceBar file drops", () => {+ it("routes a dropped file to the workspace it landed on", () => {+ const onDropFiles = vi.fn();+ render(<WorkspaceBar {...base} onDropFiles={onDropFiles} />);++ const tab = screen.getByTestId("workspace-tab-drop-w2");+ fireEvent.drop(tab, { dataTransfer: transfer(["Files"]) });++ expect(onDropFiles).toHaveBeenCalledTimes(1);+ // The workspace that was dropped ON, not the one on screen.+ expect(onDropFiles.mock.calls[0][0]).toBe("w2");+ });++ it("hands over the paths the drag carried", () => {+ const onDropFiles = vi.fn();+ render(<WorkspaceBar {...base} onDropFiles={onDropFiles} />);++ fireEvent.drop(screen.getByTestId("workspace-tab-drop-w1"), {+ dataTransfer: transfer(["Files"]),+ });++ expect(onDropFiles.mock.calls[0][1].paths).toEqual(["C:/shot.png"]);+ });++ it("ignores a drag carrying only selected text", () => {+ const onDropFiles = vi.fn();+ render(<WorkspaceBar {...base} onDropFiles={onDropFiles} />);++ fireEvent.drop(screen.getByTestId("workspace-tab-drop-w1"), {+ dataTransfer: transfer(["text/plain"]),+ });++ expect(onDropFiles).not.toHaveBeenCalled();+ });++ it("arms the tab a file drag is over, and only that one", () => {+ render(<WorkspaceBar {...base} onDropFiles={vi.fn()} />);++ const target = screen.getByTestId("workspace-tab-drop-w2");+ const other = screen.getByTestId("workspace-tab-drop-w1");+ const before = target.className;+ fireEvent.dragEnter(target, { dataTransfer: transfer(["Files"]) });++ expect(target.className).not.toBe(before);+ expect(target.className).toContain("border-dashed");+ expect(other.className).not.toContain("border-dashed");+ });++ it("does not arm for a drag it would refuse", () => {+ render(<WorkspaceBar {...base} onDropFiles={vi.fn()} />);++ const tab = screen.getByTestId("workspace-tab-drop-w1");+ fireEvent.dragEnter(tab, { dataTransfer: transfer(["text/plain"]) });++ expect(tab.className).not.toContain("border-dashed");+ });++ it("disarms when the drag leaves the tab", () => {+ render(<WorkspaceBar {...base} onDropFiles={vi.fn()} />);++ const tab = screen.getByTestId("workspace-tab-drop-w2");+ fireEvent.dragEnter(tab, { dataTransfer: transfer(["Files"]) });+ fireEvent.dragLeave(tab, { dataTransfer: transfer(["Files"]) });++ expect(tab.className).not.toContain("border-dashed");+ });++ it("disarms when a drag that started here ends somewhere else", () => {+ // `dragleave` is not guaranteed to arrive; a tab left highlighted over a+ // workspace nobody dropped on is a lie about what happens next.+ render(<WorkspaceBar {...base} onDropFiles={vi.fn()} />);++ const tab = screen.getByTestId("workspace-tab-drop-w2");+ fireEvent.dragEnter(tab, { dataTransfer: transfer(["Files"]) });+ fireEvent.dragEnd(window);++ expect(tab.className).not.toContain("border-dashed");+ });++ it("still selects and renames normally with drops wired up", () => {+ const onSelect = vi.fn();+ render(<WorkspaceBar {...base} onSelect={onSelect} onDropFiles={vi.fn()} />);++ fireEvent.click(screen.getByTestId("workspace-tab-w2"));++ expect(onSelect).toHaveBeenCalledWith("w2");+ });++ it("takes no drags at all when the owner wired no handler", () => {+ // Accepting one would mean swallowing a file nothing does anything with.+ render(<WorkspaceBar {...base} />);++ const tab = screen.getByTestId("workspace-tab-drop-w1");+ fireEvent.dragEnter(tab, { dataTransfer: transfer(["Files"]) });++ expect(tab.className).not.toContain("border-dashed");+ });+});diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.test.tsxnew file mode 100644index 0000000000..551d981fc6--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.test.tsx@@ -0,0 +1,214 @@+/**+ * Component tests for the workspace's settings panel.+ *+ * What matters here is not the layout but WHICH PLAN gets spent: that the+ * toolbar names the account the next terminal opens on, that it stays silent+ * for the many people holding a single login, and that a switch made in here+ * travels through the workspace — the store route alone would leave the open+ * session believing the old account until the next full reload.+ */+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";++const pushToast = vi.fn();+vi.mock("@/store/events", () => ({+ useEventStore: (selector: (s: Record<string, unknown>) => unknown) =>+ selector({ pushToast }),+}));++vi.mock("@/lib/agenticIdeApi", () => ({ setIdeActiveAccount: vi.fn() }));++vi.mock("@/lib/agentAccountsApi", async () => {+ const actual = await vi.importActual<typeof import("@/lib/agentAccountsApi")>(+ "@/lib/agentAccountsApi",+ );+ return {+ ...actual,+ fetchAgentAccounts: vi.fn(),+ createAgentAccount: vi.fn(),+ setActiveAgentAccount: vi.fn(),+ loginAgentAccount: vi.fn(),+ deleteAgentAccount: vi.fn(),+ renameAgentAccount: vi.fn(),+ };+});++import { WorkspaceSettings } from "./WorkspaceSettings";+import { setIdeActiveAccount, type IdeAccountState } from "@/lib/agenticIdeApi";+import { fetchAgentAccounts, setActiveAgentAccount } from "@/lib/agentAccountsApi";++function ideAccounts(over: Partial<IdeAccountState> = {}): IdeAccountState[] {+ return [+ {+ agent: "claude",+ display_name: "Claude Code",+ active_account: "claude:default",+ active_label: "Default Claude Code login",+ account_count: 1,+ ...over,+ },+ {+ agent: "codex",+ display_name: "Codex",+ active_account: "codex:default",+ active_label: "Default Codex login",+ account_count: 1,+ },+ ];+}++function account(over: Record<string, unknown> = {}) {+ return {+ id: "claude:default",+ platform: "claude" as const,+ label: "Default Claude Code login",+ config_dir: "/home/u/.claude",+ builtin: true,+ connected: true,+ mode: "subscription",+ message: "Signed in via Claude Max.",+ email: null,+ tier: "max",+ ...over,+ };+}++const secondSeat = account({+ id: "claude:abc123",+ label: "Second seat",+ builtin: false,+ message: "Signed in via Claude Max.",+});++function accountsResponse() {+ return {+ platforms: [+ {+ platform: "claude" as const,+ active_account: "claude:default",+ accounts: [account(), secondSeat],+ },+ {+ platform: "codex" as const,+ active_account: "codex:default",+ accounts: [+ account({+ id: "codex:default",+ platform: "codex",+ label: "Default Codex login",+ }),+ ],+ },+ ],+ };+}++afterEach(cleanup);+beforeEach(() => {+ pushToast.mockReset();+ vi.mocked(setIdeActiveAccount).mockReset();+ vi.mocked(fetchAgentAccounts).mockReset();+ vi.mocked(setActiveAgentAccount).mockReset();+});++describe("the workspace's account chip", () => {+ it("stays away while there is only one login to choose from", () => {+ render(<WorkspaceSettings accounts={ideAccounts()} />);+ // The gear is always reachable — it is also where a second one is added.+ expect(screen.getByTestId("agentic-settings-open")).toBeTruthy();+ expect(screen.queryByTestId("active-account-claude")).toBeNull();+ });++ it("names the plan the next terminal will spend, once there are two", () => {+ render(+ <WorkspaceSettings+ accounts={ideAccounts({ active_label: "Second seat", account_count: 2 })}+ />,+ );+ expect(screen.getByTestId("active-account-claude").textContent).toContain(+ "Second seat",+ );+ // Codex still has one login, so it says nothing.+ expect(screen.queryByTestId("active-account-codex")).toBeNull();+ });+});++describe("switching the account from inside the workspace", () => {+ it("shows which subscription each CLI is on right now", async () => {+ vi.mocked(fetchAgentAccounts).mockResolvedValue(accountsResponse() as never);+ render(+ <WorkspaceSettings+ accounts={ideAccounts({ active_label: "Second seat", account_count: 2 })}+ />,+ );+ fireEvent.click(screen.getByTestId("agentic-settings-open"));++ await waitFor(() =>+ expect(screen.getByTestId("settings-active-claude").textContent).toBe(+ "Second seat",+ ),+ );+ expect(screen.getByTestId("settings-active-codex").textContent).toBe(+ "Default Codex login",+ );+ });++ it("applies the switch through the workspace and hands the new state back", async () => {+ const switched = {+ active: true,+ session: null,+ max_terminals: 12,+ workspaces: [],+ active_id: null,+ max_workspaces: 6,+ accounts: ideAccounts({+ active_account: "claude:abc123",+ active_label: "Second seat",+ account_count: 2,+ }),+ };+ vi.mocked(fetchAgentAccounts).mockResolvedValue(accountsResponse() as never);+ vi.mocked(setIdeActiveAccount).mockResolvedValue(switched as never);+ const onStateChanged = vi.fn();++ render(+ <WorkspaceSettings+ accounts={ideAccounts({ account_count: 2 })}+ onStateChanged={onStateChanged}+ />,+ );+ fireEvent.click(screen.getByTestId("agentic-settings-open"));+ await waitFor(() => expect(screen.getByText("Second seat")).toBeTruthy());++ const row = screen.getByText("Second seat").closest("li")!;+ fireEvent.click(row.querySelector("button")!);++ await waitFor(() =>+ expect(setIdeActiveAccount).toHaveBeenCalledWith("claude", "claude:abc123"),+ );+ // Straight to the workspace — going through the account store alone would+ // leave the open session spawning panes on the previous plan.+ expect(setActiveAgentAccount).not.toHaveBeenCalled();+ await waitFor(() => expect(onStateChanged).toHaveBeenCalledWith(switched));+ expect(pushToast).toHaveBeenCalledWith(+ "success",+ "New Claude Code terminals will use Second seat.",+ );+ });++ it("says so instead of silently keeping the old account when the switch fails", async () => {+ vi.mocked(fetchAgentAccounts).mockResolvedValue(accountsResponse() as never);+ vi.mocked(setIdeActiveAccount).mockRejectedValue(+ new Error("That account no longer exists."),+ );++ render(<WorkspaceSettings accounts={ideAccounts({ account_count: 2 })} />);+ fireEvent.click(screen.getByTestId("agentic-settings-open"));+ await waitFor(() => expect(screen.getByText("Second seat")).toBeTruthy());+ fireEvent.click(screen.getByText("Second seat").closest("li")!.querySelector("button")!);++ await waitFor(() =>+ expect(pushToast).toHaveBeenCalledWith("error", "That account no longer exists."),+ );+ });+});diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.tsxnew file mode 100644index 0000000000..da9f43428a--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceSettings.tsx@@ -0,0 +1,186 @@+/**+ * The workspace's own settings, opened from the Agentic-IDE toolbar.+ *+ * One subject so far, and it is the one that has to be reachable from INSIDE+ * the workspace rather than three sections away in the app's settings: which+ * subscription the next terminal opens on. Someone running two Claude Max seats+ * decides that while looking at the panes — "the next one goes on the personal+ * plan" — and sending them out of the workspace to say so means losing the+ * screen they were reasoning about.+ *+ * Three things this surface is careful about:+ *+ * 1. **It says where the switch lands.** Switching applies to terminals opened+ * from now on; every pane already on screen keeps the account it started+ * with, because moving a running agent onto a plan whose history has never+ * seen its conversation would make it amnesiac with no explanation.+ * 2. **It stays quiet when there is nothing to choose.** The active-account+ * chips appear only once a second subscription of that CLI is registered.+ * The gear itself is always there — it is also where the second one is added.+ * 3. **It is the SAME panel as the app's account page**, not a second copy of+ * it. Only how the switch is applied differs: here it goes through the+ * workspace, so the open session learns about it in the same round-trip.+ */+import { useState } from "react";+import * as Dialog from "@radix-ui/react-dialog";+import { Settings2, Users, X } from "lucide-react";++import { AgentAccountsPanel } from "@/components/AgentAccountsPanel";+import type { AccountPlatform } from "@/lib/agentAccountsApi";+import {+ setIdeActiveAccount,+ type IdeAccountState,+ type IdeState,+} from "@/lib/agenticIdeApi";+import { useEventStore } from "@/store/events";+import { cn } from "@/lib/utils";++interface WorkspaceSettingsProps {+ /** The active subscription per coding CLI, as the backend reports it. */+ accounts: IdeAccountState[];+ /** A switch changed the workspace state — the owner applies what came back. */+ onStateChanged?: (state: IdeState) => void;+ /** True while the workspace is busy with something that must finish first. */+ busy?: boolean;+}++/** Coding CLIs where more than one subscription is registered — the rest are silent. */+function switchable(accounts: IdeAccountState[]): IdeAccountState[] {+ return accounts.filter((a) => a.account_count > 1 && Boolean(a.active_label));+}++export function WorkspaceSettings({+ accounts,+ onStateChanged,+ busy = false,+}: WorkspaceSettingsProps) {+ const pushToast = useEventStore((s) => s.pushToast);+ const [open, setOpen] = useState(false);+ const chips = switchable(accounts);++ /*+ * Applying the switch through the WORKSPACE rather than through the account+ * store directly. Both end up writing the same stored default — but this way+ * the open session is told in the same call, so the account the next pane+ * gets and the account the toolbar shows can never be one click apart.+ *+ * Returns nothing on purpose: the panel then re-reads the account list, which+ * is the shorter path to a list that is right about sign-in state too.+ */+ const activate = async (platform: AccountPlatform, accountId: string) => {+ const state = await setIdeActiveAccount(platform, accountId);+ onStateChanged?.(state);+ const account = state.accounts?.find((a) => a.agent === platform);+ if (account?.active_label) {+ pushToast(+ "success",+ `New ${account.display_name} terminals will use ${account.active_label}.`,+ );+ }+ };++ return (+ <div className="flex shrink-0 items-center gap-2">+ {chips.map((account) => (+ <span+ key={account.agent}+ data-testid={`active-account-${account.agent}`}+ title={`New ${account.display_name} terminals open on ${account.active_label}. Panes already running keep theirs.`}+ className="hidden max-w-[16rem] items-center gap-1.5 rounded-lg border border-border px-2 py-1 text-[11px] text-muted-foreground xl:flex"+ >+ <Users className="h-3 w-3 shrink-0 text-primary" />+ <span className="truncate">{account.active_label}</span>+ </span>+ ))}++ <Dialog.Root open={open} onOpenChange={setOpen}>+ <Dialog.Trigger asChild>+ <button+ type="button"+ data-testid="agentic-settings-open"+ title="Workspace settings — choose which subscription new terminals use"+ aria-label="Workspace settings"+ className={cn(+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors",+ "hover:border-primary/40 hover:text-foreground",+ )}+ >+ <Settings2 className="h-4 w-4" />+ </button>+ </Dialog.Trigger>++ <Dialog.Portal>+ <Dialog.Overlay className="fixed inset-0 z-50 bg-background/70 backdrop-blur-sm" />+ <Dialog.Content+ data-testid="agentic-settings"+ className="fixed left-1/2 top-1/2 z-50 flex max-h-[min(44rem,calc(100vh-4rem))] w-[min(52rem,calc(100vw-3rem))] -translate-x-1/2 -translate-y-1/2 flex-col rounded-2xl border border-border bg-card shadow-2xl"+ >+ <div className="flex items-start justify-between gap-4 border-b border-border px-5 py-4">+ <div className="min-w-0">+ <Dialog.Title className="font-display text-base font-semibold">+ Workspace settings+ </Dialog.Title>+ <Dialog.Description className="mt-1 text-xs text-muted-foreground">+ Connect several subscriptions of the same coding CLI and choose+ which one powers new agent terminals.+ </Dialog.Description>+ </div>+ <Dialog.Close asChild>+ <button+ type="button"+ aria-label="Close settings"+ className="shrink-0 rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"+ >+ <X className="h-4 w-4" />+ </button>+ </Dialog.Close>+ </div>++ <div className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis px-5 py-4">+ {/* What is in force right now, in words rather than ids — the+ answer to "which plan is the next terminal going to spend?". */}+ <ul className="mb-4 grid gap-2 sm:grid-cols-2">+ {accounts.map((account) => (+ <li+ key={account.agent}+ className="rounded-xl border border-border bg-background/40 px-3 py-2"+ >+ <p className="text-[10px] uppercase tracking-wider text-muted-foreground">+ {account.display_name} · new terminals+ </p>+ <p+ className="truncate text-sm font-medium"+ data-testid={`settings-active-${account.agent}`}+ >+ {account.active_label ?? "—"}+ </p>+ </li>+ ))}+ </ul>++ <AgentAccountsPanel+ onActivate={activate}+ note={+ "Switching applies to terminals opened from now on — the panes " ++ "you already have keep the account they started with, so no " ++ "running agent loses its conversation. Splitting a pane keeps " ++ "that pane's account."+ }+ />+ </div>++ <div className="flex items-center justify-end gap-2 border-t border-border px-5 py-3">+ <Dialog.Close asChild>+ <button type="button" className="btn-ghost" disabled={busy}>+ Done+ </button>+ </Dialog.Close>+ </div>+ </Dialog.Content>+ </Dialog.Portal>+ </Dialog.Root>+ </div>+ );+}++export default WorkspaceSettings;diff --git a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts b/jarvis/ui/web/frontend/src/hooks/useWebSocket.tsindex e2816c21d2..5a4f3a6cf4 100644--- a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts+++ b/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts@@ -256,8 +256,11 @@ export function useWebSocket(): void {window.dispatchEvent(new CustomEvent("jarvis:secret-configured", { detail: env.payload }));}- if (env.event_name === "AgenticIdeTerminalsAdded") {- // Panes were opened by voice or the CLI. The workspace view loads its+ if (+ env.event_name === "AgenticIdeTerminalsAdded" ||+ env.event_name === "AgenticIdeTerminalsClosed"+ ) {+ // Panes were changed by voice or the CLI. The workspace view loads its// state once on mount, so without this it would keep showing the old// grid while the agents are already running. Trigger only — the view// re-runs its own fetch, which is the single source of truth for thediff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex e80c583a2b..5e7f7c87e5 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -2717,131 +2717,22 @@"result_error": "Discord nicht erreichbar, bitte später erneut versuchen."},"ultrawiki": {- "explore": {- "vault": {- "title": "Obsidian-Vault",- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",- "export": "Exportieren",- "exporting": "Wird geschrieben …",- "exported": "{0} Notizen geschrieben, {1} unverändert.",- "notes": "{0} Notizen",- "never": "Noch nie exportiert",- "last": "Zuletzt am {0}",- "register": "Bei Obsidian anmelden",- "registering": "Wird angemeldet …",- "registered": "In Obsidian eingetragen",- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",- "error": "Hat nicht geklappt: {0}"- },- "vault": {- "title": "Obsidian-Vault",- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",- "export": "Exportieren",- "exporting": "Wird geschrieben …",- "exported": "{0} Notizen geschrieben, {1} unverändert.",- "notes": "{0} Notizen",- "never": "Noch nie exportiert",- "last": "Zuletzt am {0}",- "register": "Bei Obsidian anmelden",- "registering": "Wird angemeldet …",- "registered": "In Obsidian eingetragen",- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",- "error": "Hat nicht geklappt: {0}"- },- "tab": "Entdecken",- "loading": "Wissensbestand wird gelesen …",- "error": "Der Wissensbestand konnte nicht gelesen werden.",- "entities_title": "Begriffe",- "entities_count": "{0} Begriffe",- "moments_title": "Momente",- "moments_count": "{0} Momente",- "graph_title": "Verbindungen",- "search_placeholder": "Begriff suchen …",- "no_search_hits": "Kein Begriff passt zu „{0}“.",- "mentions": "{0}×",- "mentions_long": "{0} Erwähnungen",- "period": "{0} bis {1}",- "neighbors": "Taucht auf mit",- "no_neighbors": "Kommt bisher immer allein vor.",- "shared": "{0} gemeinsame Momente",- "back": "Zurück zur Übersicht",- "open_source": "Beleg öffnen",- "source_prefix": "aus",- "min_mentions": "Ab {0} Erwähnungen",- "graph_shown": "{0} von {1} Begriffen",- "graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",- "graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",- "moments_of": "Momente mit {0}",- "empty": {- "no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",- "nothing_imported": "Eine Quelle ist verbunden, aber es wurde noch nichts geholt. Starte den Import bei den Quellen.",- "nothing_distilled": "Es liegen Einträge da, aber noch keiner wurde ausgewertet. Dafür braucht es ein eingerichtetes Sprachmodell in den Einstellungen.",- "no_entities": "Die Einträge wurden ausgewertet, aber es kamen keine Namen oder Orte darin vor. Die Momente unten kannst du trotzdem durchblättern."- }- },- "explore": {- "vault": {- "title": "Obsidian-Vault",- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",- "export": "Exportieren",- "exporting": "Wird geschrieben …",- "exported": "{0} Notizen geschrieben, {1} unverändert.",- "notes": "{0} Notizen",- "never": "Noch nie exportiert",- "last": "Zuletzt am {0}",- "register": "Bei Obsidian anmelden",- "registering": "Wird angemeldet …",- "registered": "In Obsidian eingetragen",- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",- "error": "Hat nicht geklappt: {0}"- },- "tab": "Entdecken",- "loading": "Wissensbestand wird gelesen …",- "error": "Der Wissensbestand konnte nicht gelesen werden.",- "entities_title": "Begriffe",- "entities_count": "{0} Begriffe",- "moments_title": "Momente",- "moments_count": "{0} Momente",- "graph_title": "Verbindungen",- "search_placeholder": "Begriff suchen …",- "no_search_hits": "Kein Begriff passt zu „{0}“.",- "mentions": "{0}×",- "mentions_long": "{0} Erwähnungen",- "period": "{0} bis {1}",- "neighbors": "Taucht auf mit",- "no_neighbors": "Kommt bisher immer allein vor.",- "shared": "{0} gemeinsame Momente",- "back": "Zurück zur Übersicht",- "open_source": "Beleg öffnen",- "source_prefix": "aus",- "min_mentions": "Ab {0} Erwähnungen",- "graph_shown": "{0} von {1} Begriffen",- "graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",- "graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",- "moments_of": "Momente mit {0}",- "empty": {- "no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",- "nothing_imported": "Eine Quelle ist verbunden, aber es wurde noch nichts geholt. Starte den Import bei den Quellen.",- "nothing_distilled": "Es liegen Einträge da, aber noch keiner wurde ausgewertet. Dafür braucht es ein eingerichtetes Sprachmodell in den Einstellungen.",- "no_entities": "Die Einträge wurden ausgewertet, aber es kamen keine Namen oder Orte darin vor. Die Momente unten kannst du trotzdem durchblättern."- }- },"explore": {- "vault": {- "title": "Obsidian-Vault",- "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",- "export": "Exportieren",- "exporting": "Wird geschrieben …",- "exported": "{0} Notizen geschrieben, {1} unverändert.",- "notes": "{0} Notizen",- "never": "Noch nie exportiert",- "last": "Zuletzt am {0}",- "register": "Bei Obsidian anmelden",- "registering": "Wird angemeldet …",- "registered": "In Obsidian eingetragen",- "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",- "error": "Hat nicht geklappt: {0}"- },+ "vault": {+ "title": "Obsidian-Vault",+ "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",+ "export": "Exportieren",+ "exporting": "Wird geschrieben …",+ "exported": "{0} Notizen geschrieben, {1} unverändert.",+ "notes": "{0} Notizen",+ "never": "Noch nie exportiert",+ "last": "Zuletzt am {0}",+ "register": "Bei Obsidian anmelden",+ "registering": "Wird angemeldet …",+ "registered": "In Obsidian eingetragen",+ "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",+ "error": "Hat nicht geklappt: {0}"+ },"tab": "Entdecken","loading": "Wissensbestand wird gelesen …","error": "Der Wissensbestand konnte nicht gelesen werden.",@@ -2864,7 +2755,13 @@"min_mentions": "Ab {0} Erwähnungen","graph_shown": "{0} von {1} Begriffen","graph_hint": "Weniger häufige Begriffe sind ausgeblendet — Regler nach links für alle.",+ "graph_hint_short": "Zeigen ab","graph_empty": "Kein Begriff wird oft genug erwähnt. Stell den Regler auf 1.",+ "legend_size": "Größer = häufiger erwähnt",+ "legend_recency": "Länger her → gerade eben",+ "reader_hint": "Begriff wählen, um nur dessen Momente zu lesen",+ "read_more": "Ganzen Moment lesen",+ "read_less": "Moment zuklappen","moments_of": "Momente mit {0}","empty": {"no_sources": "Es ist noch keine Quelle verbunden. Verbinde zuerst eine Quelle, dann kann Jarvis etwas wissen.",@@ -3163,7 +3060,7 @@"verdict_not_ready": "Kann noch nicht antworten.","verdict_hint": "Die Schritte unten werden der Reihe nach geprüft. Alles, was du beheben kannst, hat einen Knopf daneben.","action_sync_all": "Jetzt importieren",- "action_retry_failed": "Erneut versuchen",+ "action_retry_failed": "Erneut versuchen","action_open_sources": "Quellen öffnen","action_open_settings": "Einstellungen öffnen","action_enable_mode": "Einschalten",@@ -3260,14 +3157,6 @@"partial": "{0} von {1} Quellen vollständig angekommen.","numbers": "gelesen {0} · {1} neu · {2} geändert · {3} unverändert · {4} gespeichert"},- "eta": {- "under_minute": "unter einer Minute",- "minutes": "etwa {0} Minuten",- "hours": "etwa {0} Stunden",- "days": "etwa {0} Tage",- "weeks": "etwa {0} Wochen",- "months": "etwa {0} Monate"- },"overview": {"eyebrow_verdict": "Kann ich es nutzen?","eyebrow_sources": "Woher es kommt",@@ -3282,9 +3171,6 @@"detail_starting": "Solange er nicht offen ist, kann er nicht sagen, was er enthält — deshalb stehen hier keine Zahlen. Das erledigt sich meist Sekunden nach dem Start; wenn nicht, sagen die Prüfungen unten warum.","detail_done": "Alle {0} Einträge sind durchsuchbar und zusammengefasst.","detail_working": "{0} von {1} sind noch {2}. Alles andere ist schon durchsuchbar; wie lange der Rest dauert, wird gerade gemessen.",- "pace_paused": "Zusammenfassungen pausieren absichtlich: {0}",- "detail_working_stalled": "{0} von {1} sind noch {2}, und während der Messung hat sich nichts bewegt. Die Warteschlange steht still, sie läuft nicht nur langsam.",- "detail_working_eta": "{0} von {1} sind noch {2} — {3} im gerade gemessenen Tempo ({4} pro Stunde). Alles andere ist schon durchsuchbar.","detail_stalled": "{0} von {1} werden noch {2} — aber im Moment arbeitet nichts daran.","detail_notready": "Unten muss erst etwas geklärt werden, bevor Fragen beantwortet werden können. Die Liste darunter sagt, was.","detail_empty": "Füge eine Quelle hinzu, dann landen ihre Inhalte hier. Gelesen wird nichts, bevor du es erlaubst.",@@ -3315,7 +3201,18 @@"act_running": "läuft","no_problems": "Nichts braucht deine Aufmerksamkeit.","all_checks": "Alle Prüfungen",- "waiting": "Warte auf die Antwort des Wissensspeichers…"+ "waiting": "Warte auf die Antwort des Wissensspeichers…",+ "detail_working_eta": "{0} von {1} sind noch {2} — {3} im gerade gemessenen Tempo ({4} pro Stunde). Alles andere ist schon durchsuchbar.",+ "detail_working_stalled": "{0} von {1} sind noch {2}, und während der Messung hat sich nichts bewegt. Die Warteschlange steht still, sie läuft nicht nur langsam.",+ "pace_paused": "Zusammenfassungen pausieren absichtlich: {0}"+ },+ "eta": {+ "under_minute": "unter einer Minute",+ "minutes": "etwa {0} Minuten",+ "hours": "etwa {0} Stunden",+ "days": "etwa {0} Tage",+ "weeks": "etwa {0} Wochen",+ "months": "etwa {0} Monate"}},"edit_menu": {@@ -3344,22 +3241,6 @@"rename": "Umbenennen","remove": "Entfernen"},- "agent_accounts": {- "title": "Deine Abos",- "hint": "mehrere Logins pro CLI",- "description": "Du hast mehr als ein Abo für dasselbe Coding-CLI? Trag hier jedes ein und wechsle, ohne dich abzumelden — jeder Login bleibt parallel gültig. Der Haken markiert das Konto, mit dem NEUE Terminals starten; bereits laufende Terminals behalten das Konto, mit dem sie gestartet wurden.",- "accounts": "eingetragen",- "loading": "Wird geladen…",- "add": "Konto hinzufügen",- "add_confirm": "Hinzufügen",- "cancel": "Abbrechen",- "name_placeholder": "Name, z. B. Arbeitskonto",- "use_account": "Für neue Terminals verwenden",- "in_use": "aktiv",- "sign_in": "Anmelden",- "rename": "Umbenennen",- "remove": "Entfernen"- },"agentic_grid": {"continue": {"button": "Fortsetzen",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex d5d3e82272..d2c3ca5330 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -2718,116 +2718,22 @@"result_error": "Couldn't reach Discord, please try again later."},"ultrawiki": {- "explore": {- "vault": {- "title": "Obsidian vault",- "hint": "The same knowledge as Markdown files on disk.",- "export": "Export",- "exporting": "Writing …",- "exported": "{0} notes written, {1} unchanged.",- "notes": "{0} notes",- "never": "Never exported",- "last": "Last run {0}",- "register": "Add to Obsidian",- "registering": "Adding …",- "registered": "Added to Obsidian",- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",- "error": "That did not work: {0}"- },- "tab": "Explore",- "loading": "Reading the knowledge base …",- "error": "The knowledge base could not be read.",- "entities_title": "Topics",- "entities_count": "{0} topics",- "moments_title": "Moments",- "moments_count": "{0} moments",- "graph_title": "Connections",- "search_placeholder": "Search a topic …",- "no_search_hits": "No topic matches “{0}”.",- "mentions": "{0}×",- "mentions_long": "{0} mentions",- "period": "{0} to {1}",- "neighbors": "Appears with",- "no_neighbors": "Has only ever appeared on its own.",- "shared": "{0} shared moments",- "back": "Back to the overview",- "open_source": "Open the evidence",- "source_prefix": "from",- "min_mentions": "From {0} mentions",- "graph_shown": "{0} of {1} topics",- "graph_hint": "Rarer topics are hidden — move the slider left to show all.",- "graph_empty": "No topic is mentioned often enough. Set the slider to 1.",- "moments_of": "Moments involving {0}",- "empty": {- "no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",- "nothing_imported": "A source is connected but nothing has been fetched yet. Start the import under Sources.",- "nothing_distilled": "Entries are stored but none has been analysed yet. That needs a language model configured in the settings.",- "no_entities": "The entries were analysed but named no people or places. You can still browse the moments below."- }- },- "explore": {- "vault": {- "title": "Obsidian vault",- "hint": "The same knowledge as Markdown files on disk.",- "export": "Export",- "exporting": "Writing …",- "exported": "{0} notes written, {1} unchanged.",- "notes": "{0} notes",- "never": "Never exported",- "last": "Last run {0}",- "register": "Add to Obsidian",- "registering": "Adding …",- "registered": "Added to Obsidian",- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",- "error": "That did not work: {0}"- },- "tab": "Explore",- "loading": "Reading the knowledge base …",- "error": "The knowledge base could not be read.",- "entities_title": "Topics",- "entities_count": "{0} topics",- "moments_title": "Moments",- "moments_count": "{0} moments",- "graph_title": "Connections",- "search_placeholder": "Search a topic …",- "no_search_hits": "No topic matches “{0}”.",- "mentions": "{0}×",- "mentions_long": "{0} mentions",- "period": "{0} to {1}",- "neighbors": "Appears with",- "no_neighbors": "Has only ever appeared on its own.",- "shared": "{0} shared moments",- "back": "Back to the overview",- "open_source": "Open the evidence",- "source_prefix": "from",- "min_mentions": "From {0} mentions",- "graph_shown": "{0} of {1} topics",- "graph_hint": "Rarer topics are hidden — move the slider left to show all.",- "graph_empty": "No topic is mentioned often enough. Set the slider to 1.",- "moments_of": "Moments involving {0}",- "empty": {- "no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",- "nothing_imported": "A source is connected but nothing has been fetched yet. Start the import under Sources.",- "nothing_distilled": "Entries are stored but none has been analysed yet. That needs a language model configured in the settings.",- "no_entities": "The entries were analysed but named no people or places. You can still browse the moments below."- }- },"explore": {- "vault": {- "title": "Obsidian vault",- "hint": "The same knowledge as Markdown files on disk.",- "export": "Export",- "exporting": "Writing …",- "exported": "{0} notes written, {1} unchanged.",- "notes": "{0} notes",- "never": "Never exported",- "last": "Last run {0}",- "register": "Add to Obsidian",- "registering": "Adding …",- "registered": "Added to Obsidian",- "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",- "error": "That did not work: {0}"- },+ "vault": {+ "title": "Obsidian vault",+ "hint": "The same knowledge as Markdown files on disk.",+ "export": "Export",+ "exporting": "Writing …",+ "exported": "{0} notes written, {1} unchanged.",+ "notes": "{0} notes",+ "never": "Never exported",+ "last": "Last run {0}",+ "register": "Add to Obsidian",+ "registering": "Adding …",+ "registered": "Added to Obsidian",+ "not_installed": "Obsidian is not installed on this machine. The files are written anyway — any Markdown app can open them.",+ "error": "That did not work: {0}"+ },"tab": "Explore","loading": "Reading the knowledge base …","error": "The knowledge base could not be read.",@@ -2850,7 +2756,13 @@"min_mentions": "From {0} mentions","graph_shown": "{0} of {1} topics","graph_hint": "Rarer topics are hidden — move the slider left to show all.",+ "graph_hint_short": "Show from","graph_empty": "No topic is mentioned often enough. Set the slider to 1.",+ "legend_size": "Bigger = mentioned more often",+ "legend_recency": "Longer ago → just now",+ "reader_hint": "Pick a topic to read only its moments",+ "read_more": "Read the whole moment",+ "read_less": "Collapse this moment","moments_of": "Moments involving {0}","empty": {"no_sources": "No source is connected yet. Connect one first, then Jarvis has something to know.",@@ -3149,7 +3061,7 @@"verdict_not_ready": "Not ready to answer yet.","verdict_hint": "The steps below are checked in order. Anything you can fix has a button next to it.","action_sync_all": "Import now",- "action_retry_failed": "Try again",+ "action_retry_failed": "Try again","action_open_sources": "Open sources","action_open_settings": "Open settings","action_enable_mode": "Turn on",@@ -3246,14 +3158,6 @@"partial": "{0} of {1} source(s) fully landed.","numbers": "read {0} · {1} new · {2} changed · {3} unchanged · {4} stored"},- "eta": {- "under_minute": "under a minute",- "minutes": "about {0} minutes",- "hours": "about {0} hours",- "days": "about {0} days",- "weeks": "about {0} weeks",- "months": "about {0} months"- },"overview": {"eyebrow_verdict": "Can I use it?","eyebrow_sources": "Where it comes from",@@ -3268,9 +3172,6 @@"detail_starting": "Until it opens it cannot say what it holds, so no numbers are shown. This usually clears within seconds of starting the app; if it does not, the checks below say why.","detail_done": "All {0} items are searchable and summarised.","detail_working": "{0} of {1} are still {2}. Everything else can be searched right now; how long the rest takes is still being measured.",- "pace_paused": "Summaries are paused on purpose: {0}",- "detail_working_stalled": "{0} of {1} are still {2}, and nothing has moved while this was measured. The queue is standing still rather than running slowly.",- "detail_working_eta": "{0} of {1} are still {2} — {3} at the pace measured just now ({4} an hour). Everything else can be searched right now.","detail_stalled": "{0} of {1} are still {2} — but nothing is processing them right now.","detail_notready": "Something below has to be sorted out before questions can be answered. The list underneath says what.","detail_empty": "Add a source and its contents land here. Nothing is read before you approve it.",@@ -3301,7 +3202,18 @@"act_running": "running","no_problems": "Nothing needs your attention.","all_checks": "All checks",- "waiting": "Waiting for the knowledge base to answer…"+ "waiting": "Waiting for the knowledge base to answer…",+ "detail_working_eta": "{0} of {1} are still {2} — {3} at the pace measured just now ({4} an hour). Everything else can be searched right now.",+ "detail_working_stalled": "{0} of {1} are still {2}, and nothing has moved while this was measured. The queue is standing still rather than running slowly.",+ "pace_paused": "Summaries are paused on purpose: {0}"+ },+ "eta": {+ "under_minute": "under a minute",+ "minutes": "about {0} minutes",+ "hours": "about {0} hours",+ "days": "about {0} days",+ "weeks": "about {0} weeks",+ "months": "about {0} months"}},"edit_menu": {@@ -3330,22 +3242,6 @@"rename": "Rename","remove": "Remove"},- "agent_accounts": {- "title": "Your subscriptions",- "hint": "several logins per CLI",- "description": "Hold more than one plan for the same coding CLI? Register each one here and switch without signing out — every login stays valid side by side. The tick marks the account NEW terminals open on; terminals that are already running keep the account they were started with.",- "accounts": "registered",- "loading": "Loading…",- "add": "Add account",- "add_confirm": "Add",- "cancel": "Cancel",- "name_placeholder": "Name, e.g. Work seat",- "use_account": "Use for new terminals",- "in_use": "in use",- "sign_in": "Sign in",- "rename": "Rename",- "remove": "Remove"- },"agentic_grid": {"continue": {"button": "Continue",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex dd42b62df2..2461904234 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -2717,116 +2717,22 @@"result_error": "No se pudo llegar a Discord, inténtalo de nuevo más tarde."},"ultrawiki": {- "explore": {- "vault": {- "title": "Bóveda de Obsidian",- "hint": "El mismo conocimiento como archivos Markdown en el disco.",- "export": "Exportar",- "exporting": "Escribiendo …",- "exported": "{0} notas escritas, {1} sin cambios.",- "notes": "{0} notas",- "never": "Nunca exportado",- "last": "Última vez {0}",- "register": "Añadir a Obsidian",- "registering": "Añadiendo …",- "registered": "Añadido a Obsidian",- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",- "error": "No funcionó: {0}"- },- "tab": "Explorar",- "loading": "Leyendo la base de conocimiento …",- "error": "No se pudo leer la base de conocimiento.",- "entities_title": "Temas",- "entities_count": "{0} temas",- "moments_title": "Momentos",- "moments_count": "{0} momentos",- "graph_title": "Conexiones",- "search_placeholder": "Buscar un tema …",- "no_search_hits": "Ningún tema coincide con «{0}».",- "mentions": "{0}×",- "mentions_long": "{0} menciones",- "period": "{0} a {1}",- "neighbors": "Aparece junto a",- "no_neighbors": "Hasta ahora siempre aparece solo.",- "shared": "{0} momentos compartidos",- "back": "Volver al resumen",- "open_source": "Abrir la evidencia",- "source_prefix": "de",- "min_mentions": "Desde {0} menciones",- "graph_shown": "{0} de {1} temas",- "graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",- "graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",- "moments_of": "Momentos con {0}",- "empty": {- "no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",- "nothing_imported": "Hay una fuente conectada pero aún no se ha traído nada. Inicia la importación en Fuentes.",- "nothing_distilled": "Hay entradas guardadas pero ninguna se ha analizado todavía. Para eso hace falta un modelo de lenguaje configurado en los ajustes.",- "no_entities": "Las entradas se analizaron pero no mencionaron personas ni lugares. Aun así puedes hojear los momentos de abajo."- }- },- "explore": {- "vault": {- "title": "Bóveda de Obsidian",- "hint": "El mismo conocimiento como archivos Markdown en el disco.",- "export": "Exportar",- "exporting": "Escribiendo …",- "exported": "{0} notas escritas, {1} sin cambios.",- "notes": "{0} notas",- "never": "Nunca exportado",- "last": "Última vez {0}",- "register": "Añadir a Obsidian",- "registering": "Añadiendo …",- "registered": "Añadido a Obsidian",- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",- "error": "No funcionó: {0}"- },- "tab": "Explorar",- "loading": "Leyendo la base de conocimiento …",- "error": "No se pudo leer la base de conocimiento.",- "entities_title": "Temas",- "entities_count": "{0} temas",- "moments_title": "Momentos",- "moments_count": "{0} momentos",- "graph_title": "Conexiones",- "search_placeholder": "Buscar un tema …",- "no_search_hits": "Ningún tema coincide con «{0}».",- "mentions": "{0}×",- "mentions_long": "{0} menciones",- "period": "{0} a {1}",- "neighbors": "Aparece junto a",- "no_neighbors": "Hasta ahora siempre aparece solo.",- "shared": "{0} momentos compartidos",- "back": "Volver al resumen",- "open_source": "Abrir la evidencia",- "source_prefix": "de",- "min_mentions": "Desde {0} menciones",- "graph_shown": "{0} de {1} temas",- "graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",- "graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",- "moments_of": "Momentos con {0}",- "empty": {- "no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",- "nothing_imported": "Hay una fuente conectada pero aún no se ha traído nada. Inicia la importación en Fuentes.",- "nothing_distilled": "Hay entradas guardadas pero ninguna se ha analizado todavía. Para eso hace falta un modelo de lenguaje configurado en los ajustes.",- "no_entities": "Las entradas se analizaron pero no mencionaron personas ni lugares. Aun así puedes hojear los momentos de abajo."- }- },"explore": {- "vault": {- "title": "Bóveda de Obsidian",- "hint": "El mismo conocimiento como archivos Markdown en el disco.",- "export": "Exportar",- "exporting": "Escribiendo …",- "exported": "{0} notas escritas, {1} sin cambios.",- "notes": "{0} notas",- "never": "Nunca exportado",- "last": "Última vez {0}",- "register": "Añadir a Obsidian",- "registering": "Añadiendo …",- "registered": "Añadido a Obsidian",- "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",- "error": "No funcionó: {0}"- },+ "vault": {+ "title": "Bóveda de Obsidian",+ "hint": "El mismo conocimiento como archivos Markdown en el disco.",+ "export": "Exportar",+ "exporting": "Escribiendo …",+ "exported": "{0} notas escritas, {1} sin cambios.",+ "notes": "{0} notas",+ "never": "Nunca exportado",+ "last": "Última vez {0}",+ "register": "Añadir a Obsidian",+ "registering": "Añadiendo …",+ "registered": "Añadido a Obsidian",+ "not_installed": "Obsidian no está instalado en este equipo. Los archivos se escriben igualmente: cualquier app de Markdown puede abrirlos.",+ "error": "No funcionó: {0}"+ },"tab": "Explorar","loading": "Leyendo la base de conocimiento …","error": "No se pudo leer la base de conocimiento.",@@ -2849,7 +2755,13 @@"min_mentions": "Desde {0} menciones","graph_shown": "{0} de {1} temas","graph_hint": "Los temas menos frecuentes están ocultos: mueve el control a la izquierda para verlos todos.",+ "graph_hint_short": "Mostrar desde","graph_empty": "Ningún tema se menciona lo suficiente. Pon el control en 1.",+ "legend_size": "Más grande = mencionado más veces",+ "legend_recency": "Hace tiempo → ahora mismo",+ "reader_hint": "Elige un tema para leer solo sus momentos",+ "read_more": "Leer el momento completo",+ "read_less": "Plegar este momento","moments_of": "Momentos con {0}","empty": {"no_sources": "Todavía no hay ninguna fuente conectada. Conecta una primero y Jarvis tendrá algo que saber.",@@ -3148,7 +3060,7 @@"verdict_not_ready": "Todavía no puede responder.","verdict_hint": "Los pasos de abajo se comprueban en orden. Todo lo que puedas arreglar tiene un botón al lado.","action_sync_all": "Importar ahora",- "action_retry_failed": "Intentar de nuevo",+ "action_retry_failed": "Intentar de nuevo","action_open_sources": "Abrir fuentes","action_open_settings": "Abrir ajustes","action_enable_mode": "Activar",@@ -3245,14 +3157,6 @@"partial": "{0} de {1} fuentes llegaron completas.","numbers": "leídos {0} · {1} nuevos · {2} cambiados · {3} sin cambios · {4} guardados"},- "eta": {- "under_minute": "menos de un minuto",- "minutes": "unos {0} minutos",- "hours": "unas {0} horas",- "days": "unas {0} días",- "weeks": "unas {0} semanas",- "months": "unos {0} meses"- },"overview": {"eyebrow_verdict": "¿Puedo usarlo?","eyebrow_sources": "De dónde viene",@@ -3267,9 +3171,6 @@"detail_starting": "Mientras no se abra no puede decir qué contiene, por eso no se muestran cifras. Suele resolverse a los pocos segundos de arrancar; si no, las comprobaciones de abajo dicen por qué.","detail_done": "Los {0} elementos son buscables y están resumidos.","detail_working": "{0} de {1} siguen {2}. Todo lo demás ya se puede buscar; cuánto tarda el resto se está midiendo.",- "pace_paused": "Los resúmenes están pausados a propósito: {0}",- "detail_working_stalled": "{0} de {1} siguen {2}, y nada se ha movido durante la medición. La cola está parada, no simplemente lenta.",- "detail_working_eta": "{0} de {1} siguen {2} — {3} al ritmo medido ahora mismo ({4} por hora). Todo lo demás ya se puede buscar.","detail_stalled": "{0} de {1} siguen {2}, pero ahora mismo nada los está procesando.","detail_notready": "Hay algo que resolver antes de poder responder preguntas. La lista de abajo dice qué.","detail_empty": "Añade una fuente y su contenido aparecerá aquí. Nada se lee antes de que lo apruebes.",@@ -3300,7 +3201,18 @@"act_running": "en curso","no_problems": "No hay nada que necesite tu atención.","all_checks": "Todas las comprobaciones",- "waiting": "Esperando la respuesta de la base de conocimiento…"+ "waiting": "Esperando la respuesta de la base de conocimiento…",+ "detail_working_eta": "{0} de {1} siguen {2} — {3} al ritmo medido ahora mismo ({4} por hora). Todo lo demás ya se puede buscar.",+ "detail_working_stalled": "{0} de {1} siguen {2}, y nada se ha movido durante la medición. La cola está parada, no simplemente lenta.",+ "pace_paused": "Los resúmenes están pausados a propósito: {0}"+ },+ "eta": {+ "under_minute": "menos de un minuto",+ "minutes": "unos {0} minutos",+ "hours": "unas {0} horas",+ "days": "unos {0} días",+ "weeks": "unas {0} semanas",+ "months": "unos {0} meses"}},"edit_menu": {@@ -3329,22 +3241,6 @@"rename": "Renombrar","remove": "Eliminar"},- "agent_accounts": {- "title": "Tus suscripciones",- "hint": "varios inicios de sesión por CLI",- "description": "¿Tienes más de un plan para la misma CLI de programación? Registra cada uno aquí y cambia sin cerrar sesión: todos los accesos siguen siendo válidos a la vez. La marca indica la cuenta con la que se abren los terminales NUEVOS; los terminales en curso conservan la cuenta con la que se iniciaron.",- "accounts": "registradas",- "loading": "Cargando…",- "add": "Añadir cuenta",- "add_confirm": "Añadir",- "cancel": "Cancelar",- "name_placeholder": "Nombre, p. ej. Cuenta de trabajo",- "use_account": "Usar para terminales nuevos",- "in_use": "en uso",- "sign_in": "Iniciar sesión",- "rename": "Renombrar",- "remove": "Eliminar"- },"agentic_grid": {"continue": {"button": "Continuar",diff --git a/jarvis/ui/web/frontend/src/lib/agentAccountsApi.ts b/jarvis/ui/web/frontend/src/lib/agentAccountsApi.tsindex 824473725c..b0a9fd2ad6 100644--- a/jarvis/ui/web/frontend/src/lib/agentAccountsApi.ts+++ b/jarvis/ui/web/frontend/src/lib/agentAccountsApi.ts@@ -27,7 +27,7 @@ export interface AgentAccount {email: string | null;tier: string | null;/**- * Set when this account is signed in as the SAME identity as another one —+ * Set when this account is signed in as the SAME identity as another one —* two rows, one plan's usage. Absent on older backends, hence optional.*/warning?: string | null;@@ -125,10 +125,17 @@ export function deleteAgentAccount();}-/** The group for one platform, or undefined while the list is still loading. */+/**+ * The group for one platform, or undefined while the list is still loading.+ *+ * `platforms` is optional-chained as well, and that is not defensive noise: an+ * older backend, a warming one, or a proxy answering with something else hands+ * back an object with no `platforms` at all, and reaching into it threw — which+ * took down the WHOLE section the panel sits in rather than costing one list.+ */export function groupFor(data: AgentAccountsResponse | null,platform: AccountPlatform,): AccountPlatformGroup | undefined {- return data?.platforms.find((group) => group.platform === platform);+ return data?.platforms?.find((group) => group.platform === platform);}diff --git a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.tsindex 40ff0b39ca..123fc2e689 100644--- a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts+++ b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts@@ -8,6 +8,14 @@ export interface AgentStatus {installed: boolean;version: string | null;install_command: string | null;+ /**+ * What opening this entry gives you: `"cli"` a coding agent, `"shell"` a+ * plain terminal on this machine's own shell. The UI branches on this rather+ * than on the entry's name, so a CLI registered later needs no change here.+ */+ kind?: string;+ /** One line a picker can show under the name. */+ description?: string;}export interface AgentsResponse {@@ -81,6 +89,13 @@ export interface TerminalState {name: string;agent: string;display_name: string;+ /**+ * Can Jarvis type into this pane? False for a plain terminal — that is a+ * shell prompt, and an injected line would RUN rather than be read, so the+ * prompt bar leaves those panes out instead of offering a target that+ * refuses everything sent to it.+ */+ accepts_prompts?: boolean;index: number;/** Grid column, left to right. Each column is its own stack of panes. */column: number;@@ -190,6 +205,24 @@ export interface WorkspaceCard {active: boolean;}+/**+ * Which subscription new terminals of one coding CLI open on.+ *+ * `account_count` is what lets a surface stay quiet: with a single login there+ * is nothing to choose, and a chip answering a question nobody has is noise.+ */+export interface IdeAccountState {+ /** Backend id of the coding CLI — "claude", "codex". */+ agent: string;+ /** What the user reads — "Claude Code". */+ display_name: string;+ active_account: string | null;+ /** Its display name ("Work seat"), which is the only readable form of the id. */+ active_label: string | null;+ /** How many subscriptions are registered for this CLI, the built-in included. */+ account_count: number;+}+export interface IdeState {active: boolean;session: SessionState | null;@@ -199,6 +232,8 @@ export interface IdeState {/** The one on screen, or null while the wizard is showing. */active_id: string | null;max_workspaces: number;+ /** The active subscription per coding CLI. Absent on an older backend. */+ accounts?: IdeAccountState[];}/** One pane of the workspace being offered back after a close or a restart. */@@ -841,6 +876,27 @@ export async function setFocusMode(enabled: boolean): Promise<boolean> {return body.focus_mode;}+/**+ * One dropped file after the backend has read what is actually in it.+ *+ * `detail` is the whole point: for an image it is a description written by a+ * model that could see it, for a document the extracted text. That is what+ * makes dropping a screenshot useful against a coding agent that cannot open+ * one — the file reference alone would leave it guessing.+ */+export interface DropAttachment {+ name: string;+ /** How the agent should refer to the file — `@path` or a quoted path. */+ reference: string;+ kind: "image" | "text" | "pdf" | "other";+ /** The description or extracted text. Empty when neither could be produced. */+ detail: string;+ /** Which layer produced `detail`. */+ described_by: "vision" | "extraction" | "none";+ /** Why `detail` is empty or shortened. Empty on the happy path. */+ note: string;+}+export interface AttachResult {terminal: string;/** What was typed into the pane — `@path` for Claude Code, a quoted path otherwise. */@@ -850,6 +906,10 @@ export interface AttachResult {/** How many had to be copied into the workspace (the rest were already there). */copied: number;submitted: boolean;+ /** False when `deliver: false` held the files back instead of typing them. */+ delivered?: boolean;+ /** Present only when `analyze` was asked for. */+ analysis?: DropAttachment[];}/**@@ -859,6 +919,11 @@ export interface AttachResult {* `paths` are the real locations an Explorer/Finder drag usually carries, and* `files` are raw bytes for everything else (a pasted screenshot has no path at* all). Sending both lets the backend skip copying whatever already exists.+ *+ * `analyze` and `deliver` are what separate a drop on a PANE from a drop on the+ * prompt bar. A pane wants the path typed and nothing else. The prompt bar wants+ * the file read — described or extracted — and held, because the user is still+ * writing the sentence that explains it.*/export async function attachToTerminal(name: string,@@ -867,6 +932,10 @@ export async function attachToTerminal(paths?: string[];note?: string;submit?: boolean;+ /** Read the files' contents and return them under `analysis`. */+ analyze?: boolean;+ /** Default true. False stores and analyses without typing into the pane. */+ deliver?: boolean;},): Promise<AttachResult> {const form = new FormData();@@ -874,6 +943,8 @@ export async function attachToTerminal(if (payload.paths?.length) form.append("paths", payload.paths.join("\n"));if (payload.note) form.append("note", payload.note);if (payload.submit) form.append("submit", "true");+ if (payload.analyze) form.append("analyze", "true");+ if (payload.deliver === false) form.append("deliver", "false");const res = await fetch(`/api/agentic-ide/terminals/${encodeURIComponent(name)}/attach`,@@ -912,18 +983,29 @@ export interface PromptResult {* `composePrompt`) so the user approves the rewrite before it is typed into* their agent. Silently rewriting what someone typed would be the wrong kind* of helpful; showing it and asking is not.+ *+ * `attachments` belong on the VERBATIM path, not on the composed one. Someone+ * who chose their own wording still dropped a screenshot on purpose, and+ * sending their sentence without it would lose the file they attached; the+ * backend appends the contents underneath their words rather than rewriting+ * them. The composed text already carries the same material, so passing them+ * with it would say everything twice.*/export async function promptTerminal(name: string,prompt: string,- options: { compose?: boolean } = {},+ options: { compose?: boolean; attachments?: DropAttachment[] } = {},): Promise<PromptResult> {const res = await fetch(`/api/agentic-ide/terminals/${encodeURIComponent(name)}/prompt`,{method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify({ prompt, compose: Boolean(options.compose) }),+ body: JSON.stringify({+ prompt,+ compose: Boolean(options.compose),+ attachments: options.attachments ?? [],+ }),},);if (!res.ok) throw new Error(await detail(res));@@ -945,17 +1027,24 @@ export interface ComposedPreview {* Same composition the spoken path uses, stopped one step short so the user can* read it. Takes as long as one model call plus reading a few files — the* caller should show that it is working.+ *+ * `attachments` are files the user dropped onto the prompt bar, already read by+ * the attach endpoint. They are passed HERE and not on the send that follows:+ * the composed text already contains their contents, so sending them twice+ * would append the same description underneath the brief that just described+ * it.*/export async function composePrompt(name: string,prompt: string,+ attachments: DropAttachment[] = [],): Promise<ComposedPreview> {const res = await fetch(`/api/agentic-ide/terminals/${encodeURIComponent(name)}/prompt`,{method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify({ prompt, compose: true, dry_run: true }),+ body: JSON.stringify({ prompt, compose: true, dry_run: true, attachments }),},);if (!res.ok) throw new Error(await detail(res));