Skip to content

ui: prompt library, a System message submenu and a Library page - #29

Draft
allozaur wants to merge 11 commits into
allozaur/feat/serversfrom
allozaur/feat/prompt-library
Draft

allozaur wants to merge 11 commits into
allozaur/feat/serversfrom
allozaur/feat/prompt-library

Conversation

@allozaur

@allozaur allozaur commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Overview

Saved prompts can be used as a chat's system message from a System message submenu in the chat form's Add menu, and a system message written in the chat can be added to the library. A Library page, reached from the sidebar, lists the prompts as cards that start a new chat with them, and has a Media tab.

Additional information

Part 9 of 13 of a work-in-progress stack on the fork, under the typed routes (#73), based on allozaur/feat/servers. Its diff is only this layer, and it is written on the design system's tokens and components (#22, lower in the stack).

Since 13 November the stack has MCP as an extension (#61) below this layer, so the System message menu no longer reads the MCP store. It lists what extensions offer through a new extension point, systemPromptSources: MCP contributes its prompts, their text, its argument form and the card of a system message made from one. With MCP switched off the menu holds the prompt library only, and such a system message is drawn as a library prompt card.

A fresh take on ggml-org#25034, built on projects. It now also carries the Library page from the closed #31.

The Media tab is still a mock-up with placeholder images, videos and audio clips: nothing stores media yet.

What changed
  • Prompts are stored in IndexedDB. The chat form's Add menu has a System message submenu that uses one as the chat's system message, and a system message made from a prompt shows as a prompt card, like the MCP prompt one.
  • A system message written in the chat can be added to the library.
  • A Library entry in the sidebar opens the Library page, with Prompts and Media tabs. Prompt cards start a new chat with the prompt as its system message, and prompts can be created, edited and deleted there.
  • On phones, the Library title starts a row below the menu key, and New prompt is a floating key on the Prompts tab.
Commits (10)
  • ui : add a prompt library store in IndexedDB
  • ui : add a System message submenu to the chat add menu
  • ui : show the prompt a system message came from
  • ui : add a system message to the prompt library
  • ui : show system messages made from a prompt as prompt cards
  • ui : add a Library entry to the sidebar
  • ui : turn the Library into Prompts and Media tabs
  • ui: keep the Library title clear of the status bar and the menu key on phones
  • ui: give New prompt the floating key on phones
Testing
  • Type-check passes on this layer after moving it above servers; lint and the test projects run in CI.
  • Checked in the browser before the move: a new prompt from the Library, a prompt added from a chat's system message, and a chat started from a prompt card, whose system message shows the prompt it came from.
  • In a phone viewport with the status bar simulated, the Library title starts a row below the menu key, clear of the status-bar fade, and New prompt is the same floating key on the Prompts tab (the Media tab has none).

Requirements

@allozaur
allozaur added this pull request to stack #30 October 31, 2026 16:46
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from 7d89ebb to dd613da Compare October 31, 2026 17:26
@allozaur
allozaur removed this pull request from stack #30 October 31, 2026 17:28
@allozaur
allozaur changed the base branch from allozaur/feat/projects to allozaur/feat/sidebar-footer October 31, 2026 17:29
@allozaur
allozaur added this pull request to stack #33 October 31, 2026 17:29
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch from dd613da to 923fd7c Compare October 31, 2026 23:47
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from 65bec27 to 758fe5d Compare November 1, 2026 00:37
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from 7daf7ab to f44cca5 Compare November 1, 2026 01:32
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from cd8209e to 443e1c7 Compare November 1, 2026 02:19
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from 19e16b5 to 76a88fc Compare November 1, 2026 02:47
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 2 times, most recently from 1ea466f to 543e8c8 Compare November 1, 2026 10:03
@allozaur
allozaur force-pushed the allozaur/feat/prompt-library branch 3 times, most recently from b5df5e9 to e6c527c Compare November 1, 2026 12:08
Prompts are reusable system messages kept in a new prompts table, with
CRUD in DatabaseService and a promptsStore that searches by name,
description and content. A system message can link to the prompt it came
from through a PROMPT message extra. MCP prompt ids use an mcp: prefix so
they are never read as library prompts.

Assisted-by: Claude (Opus 5.5 Medium)
The add dropdown's plain System message item becomes a submenu that lists
the prompt library, MCP prompts and a Write new entry, with search. The
mobile drawer shows the same list. Picking a library prompt, or an MCP
prompt without arguments, sets the conversation's system message to its
text and links the message to the prompt. An MCP prompt with arguments
opens the existing argument form in the prompt picker.

MCP prompts reach the list through a new extension point,
systemPromptSources: the MCP extension lists its prompts, gives their text
and opens its argument form in the prompt picker. With MCP switched off the
list holds the prompt library only.

Assisted-by: Claude (Opus 5.5 Medium)
A system message made from a prompt shows the prompt title under its card.
When the message text and the library prompt differ, a Modified link opens
a dialog to update the prompt with the message text, with an optional
rename, or to sync the message from the prompt. The side edited last is
the newer one, using the prompt's lastModified against the message
timestamp. If the prompt was deleted, the message offers Save as new.

Assisted-by: Claude (Opus 5.5 Medium)
A system message written in the chat, not linked to a prompt yet, shows an
"Add to library" link under it. It opens a dialog to name and describe the
prompt, with the message text shown as is, and saving adds the prompt and
links the message to it, so the System message submenu lists it from then
on. The same dialog adds and edits prompts with editable text elsewhere.

Assisted-by: Claude (Opus 5.5 Medium)
As in the old custom prompts work, a system message made from a prompt
shows as a prompt card instead of a plain bubble: one from an MCP prompt as
the MCP prompt card, with its server and name, and one from a library prompt
as a card laid out the same way, with the prompt's name above its text and
the Modified or Save as new link beside the name. A system message written
in the chat keeps the bubble and its Add to library link.

Picking a prompt on a new chat already creates the chat and adds the
prompt; it now lands as one of these cards.

Assisted-by: Claude (Opus 5.5 Medium)
A Library page, reachable from the sidebar actions, mocked up with placeholder items: a toolbar with file type and source filters, a grid or list view switch, search and a New menu, tabs for recent, favorite, folder, image and all items, and the items as a list or a grid of previews with their actions in a "more actions" menu and on right-click. Nothing acts on real files yet. The page fades in on arrival, with the same fade as the projects pages.

Assisted by: Claude (Opus 5.5 Medium)
The Library keeps two tabs, styled like the Projects page's. Prompts lists
the prompt library as cards, like project cards: a card starts a new chat
whose system message is the prompt, linked to it, and its menu and
right-click also edit or delete it. A New prompt button and search sit
above them, and an empty library points to "Add to library" in a chat.
Media is still a mock-up, of images, videos and audio clips, with search
and the grid or list switch; the folders, documents and the source and
file type filters are gone.

Assisted-by: Claude (Opus 5.5 Medium)
…n phones

Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
A saved prompt attached to a message has a title rather than a file
name, so search_chats now lists it by its title among the attachments.

Assisted-by: Claude (Opus 5.5 Medium)
Its rows set their own margins, padding, small corners and hover fill, so
"Write new" sat lower than the row that opens the submenu and the rows
looked unlike every other menu's. They now take the menu item's style;
prompt rows keep only their two-line layout.

Assisted-by: Claude (Opus 5.5 Medium)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation server/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant