feat(session-ui): pin chat messages by Nekspert · Pull Request #55221 · anomalyco/opencode · GitHub
Skip to content

feat(session-ui): pin chat messages - #55221

Draft
Nekspert wants to merge 2 commits into
anomalyco:devfrom
Nekspert:feat/pin-chat-messages
Draft

Nekspert wants to merge 2 commits into
anomalyco:devfrom
Nekspert:feat/pin-chat-messages

Conversation

@Nekspert

@Nekspert Nekspert commented Oct 13, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #55195

Type of change

  • New feature

What does this PR do?

Adds per-message pinning to the desktop/web chat (packages/session-ui).

  • Pin or unpin a whole message (user message or assistant response) from its action row. The button shows a filled pin while the message is pinned.
  • A "Pinned messages" menu in the timeline header lists the session's pins and jumps to the selected message. Each entry can be unpinned inline.
  • Pins are client-local: they live in global storage per session (sessionID -> messageID[], newest first, capped at 100). Nothing is sent to the server.

The design was discussed in #55195. This is deliberately a small v1: whole message, per session, client-local. Pinning a text selection and cross-device sync are left out.

How did you verify your code works?

  • bun test src/session/pinned-list.test.ts in packages/app (pure list helpers) - 4 pass.
  • New Playwright component test packages/session-ui/component-tests/message-pin.spec.ts pins/unpins a user message and a response and asserts the label and filled icon flip.
  • bun turbo typecheck for ui, session-ui, app passes; oxlint and prettier are clean.
  • Manually in Storybook (current-session-timeline-rows--conversation): clicking pin flips pin -> pin-filled and "Pin message" -> "Unpin message", unpinning flips it back, and the header "Pinned messages" menu lists the pins and unpins inline.

Screenshots / recordings

Chat with a user message and a response pinned (filled pin icons):

Chat with pinned messages

The "Pinned messages" header menu:

Pinned messages menu

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Timur Berezin added 2 commits October 13, 2026 22:00
Add per-message pinning to the desktop/web chat. A message or assistant response can be pinned from its action row, and the timeline header exposes a Pinned messages menu that jumps back to any pinned message.

Pins are stored client-side in global storage keyed by session and are not synced to the server, matching the v1 scope discussed in anomalyco#55195.

- ui: add pin / pin-filled icons and message pin strings
- session-ui: extend SessionUserActions with pin/unpin/isPinned/pinnedMessages and render pin buttons on user messages and assistant responses
- app: add a persisted per-session pin store, wire it through the composer region, and render the pinned-messages menu with jump-to-message
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Pin messages and selected text in the Desktop chat

1 participant