Skip to content

ui: open actions on right-click for chats, tabs, messages and models - #20

Closed
allozaur wants to merge 4 commits into
allozaur/fix/pdf-attachment-previewsfrom
allozaur/feat/context-menus
Closed

allozaur wants to merge 4 commits into
allozaur/fix/pdf-attachment-previewsfrom
allozaur/feat/context-menus

Conversation

@allozaur

@allozaur allozaur commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Overview

Right-clicking a sidebar chat, a conversation tab, a message or a model row opens the same actions as its menu button, on desktop.

Demo

Demo

Recorded at cbfc0a2; click the preview for the full video.

Additional information

Part 2 of 15 of a work-in-progress stack on the fork, based on allozaur/fix/pdf-attachment-previews. Its diff is only this layer.

It also carries the shared working-directory groundwork from #19 (directory resolution and the cwd row), which the projects layer builds on; #19 itself is out of the stack for now.

Commits (4)
  • ui : share directory resolution and the cwd row
  • ui : open an item's actions on right-click
  • ui : close conversation tabs from a right-click menu
  • ui : open a message's actions on right-click
Testing
  • Type-check passes on this layer, with 790 unit tests passing.
  • On the top of the stack, the client tests and lint pass as well.
Demo script

Recorded with npm run demo:pr against the PR head, served by the local llama-server on port 9931.

test('demo', async ({ demo, page }) => {
	const input = page.getByRole('textbox', { name: 'Type a message...' });

	await demo.caption('Send a message to start a conversation');
	await demo.type(input, 'Give me three fun facts about llamas.');
	await demo.click(page.getByRole('button', { name: 'Send' }));
	await demo.pause(6000);

	await page.goto('/');
	await demo.type(input, 'What is the tallest mountain on Earth?');
	await demo.click(page.getByRole('button', { name: 'Send' }));
	await demo.pause(6000);

	await demo.caption('Right-click a sidebar conversation to open its actions');
	await page.locator('[data-conversation-row]').first().click({ button: 'right' });
	await demo.pause(2000);
	await demo.press('Escape');

	await demo.caption('Right-click a message to open its actions');
	await page.getByText('tallest mountain', { exact: false }).last().click({ button: 'right' });
	await demo.pause(2000);
	await demo.press('Escape');

	await demo.caption('Right-click a conversation tab to open its actions');
	await page.locator('[aria-label][aria-current="page"]').first().click({ button: 'right' });
	await demo.pause(2000);
	await demo.press('Escape');
});

Requirements

@allozaur
allozaur added this pull request to stack #30 October 31, 2026 16:46
@allozaur
allozaur removed this pull request from stack #30 October 31, 2026 17:28
@allozaur
allozaur added this pull request to stack #33 October 31, 2026 17:29
@allozaur
allozaur force-pushed the allozaur/feat/context-menus branch from 12051b6 to cbfc0a2 Compare November 2, 2026 13:37
@allozaur
allozaur removed this pull request from stack #33 November 2, 2026 13:39
@allozaur
allozaur changed the base branch from allozaur/feat/mcp-resource-mentions to master November 2, 2026 13:39
@allozaur
allozaur added this pull request to stack #34 November 2, 2026 13:40
@allozaur
allozaur removed this pull request from stack #34 November 2, 2026 14:31
@allozaur
allozaur added this pull request to stack #37 November 2, 2026 14:32
Move the lookup of a browser-picked folder to ToolsService.resolveDirectoryPath, let the working directory picker run without its chip, and split the 'Set working directory to' row into its own component, so other views can pick and show a folder the same way.

Assisted by: Claude (Opus 5.5 Medium)
Sidebar conversations and models manager rows open the same actions as
their "more actions" menu on right-click. Both menus render one shared
list of actions, so they cannot drift apart. Phones keep the browser's
long-press; the dropdown's drawer already holds the actions there.
An action can render a flyout submenu in place of its row, through the
kit of the menu it is in, and close the menu after a pick.

Adds the shadcn-svelte context-menu component, mirroring the
dropdown-menu one.

Assisted by: Claude (Opus 5.5 Medium)
A tab's right-click menu closes it, the other tabs or the tabs to its
right, and stops a response the tab is generating. Closing tabs that
include the active one keeps the tab the menu was opened on.

Assisted by: Claude (Opus 5.5 Medium)
User and assistant messages open the same actions as their action icons
on right-click. Selected text, links, media, code and fields keep the
browser's own menu, so copying them works as before. The fork dialog
opens from the actions context, like the delete one, so both the icon
and the menu can open it.

Assisted by: Claude (Opus 5.5 Medium)
@allozaur
allozaur force-pushed the allozaur/feat/context-menus branch from cbfc0a2 to f6855d0 Compare November 3, 2026 10:02
@allozaur
allozaur removed this pull request from stack #37 November 3, 2026 10:02
@allozaur
allozaur changed the base branch from master to allozaur/fix/pdf-attachment-previews November 3, 2026 10:02
@allozaur
allozaur added this pull request to stack #41 November 3, 2026 10:03
@allozaur allozaur closed this Nov 9, 2026
@allozaur
allozaur removed this pull request from stack #41 November 9, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant