feat: right-click menus everywhere, workspace/session cost, long-term DB safety
Right-click menus: one portal shell (components/ContextMenu.tsx) for every item with actions - sidebar/Recents/archived session rows (SessionMenu), console tabs, pane headers, the Changes panel's files/tree/commits, the workspace home, sessions outside a workspace (SessionRowMenu: Sessions table, Dashboard, Activity, Workflow runs), prompt images, every Settings list and every Claude Code/Codex config list (FileItemMenu). Buttons stay; a delete keeps its button's confirm; the shell stops portal clicks from reaching the card that opened it. Status bar: Workspace $ and Session $ on the Workspace page, from ?lane= on GET /api/pricing/cost and the focused/replayed session's cost. Database, no data dropped: synchronous=NORMAL, journal_size_limit 64 MB, hourly PASSIVE checkpoint + PRAGMA optimize, idx_events_session_created (replacing the redundant idx_events_session), watchdog reads sessions.transcript_path, transcript parsed before the hook's write transaction, GET /api/sessions/:id?events=0 for the web page (reloads only on its own session, debounced), streamed export, transactional clear-data and chunked cleanup, subagent import reads tool_use_ids once, runtime logs rotated past 5 MB.
This commit is contained in:
@@ -285,4 +285,51 @@ describe("GlobalTooltip", () => {
|
||||
fireEvent.scroll(document);
|
||||
expect(screen.queryByTestId("global-tooltip")).toBeNull();
|
||||
});
|
||||
|
||||
it("silences an ancestor's native title while a child's bubble is up", async () => {
|
||||
// Parking only the child's title let the browser fall back to the nearest
|
||||
// ancestor's — a native black box over the designed bubble.
|
||||
render(
|
||||
<>
|
||||
<GlobalTooltip />
|
||||
<div data-testid="header" title="Drag to move this pane">
|
||||
<button title="Close pane">x</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
const header = screen.getByTestId("header");
|
||||
const button = screen.getByRole("button", { name: "x" });
|
||||
hover(button);
|
||||
await settle();
|
||||
expect(screen.getByTestId("global-tooltip")).toHaveTextContent("Close pane");
|
||||
expect(header).not.toHaveAttribute("title");
|
||||
|
||||
unhover(button);
|
||||
expect(header).toHaveAttribute("title", "Drag to move this pane");
|
||||
expect(button).toHaveAttribute("title", "Close pane");
|
||||
});
|
||||
|
||||
it("does not bring back an ancestor title React removed while it was parked", async () => {
|
||||
const { rerender } = render(
|
||||
<>
|
||||
<GlobalTooltip />
|
||||
<div data-testid="header" title="Drag">
|
||||
<button title="Close">x</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
const button = screen.getByRole("button", { name: "x" });
|
||||
hover(button);
|
||||
await settle();
|
||||
rerender(
|
||||
<>
|
||||
<GlobalTooltip />
|
||||
<div data-testid="header">
|
||||
<button title="Close">x</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
unhover(button);
|
||||
expect(screen.getByTestId("header")).not.toHaveAttribute("title");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user