feat: add message pinning to sessions - #2534
Michaelyklam wants to merge 2 commits into
Conversation
1b4814b to
432e9e3
Compare
|
Rebased this on the latest Local verification after the rebase:
The PR now reads back as mergeable/clean; GitHub checks should attach to the new head shortly. |
SummaryReading the diff ( One concrete bug to flag before merge plus a couple of smaller notes. Bug: client and server compute different
|
6576ab8 to
cc5c5c7
Compare
|
Rebased this branch on current Verification on the rebased head
GitHub Actions are green and the PR is mergeable CLEAN again. |
cc5c5c7 to
a283556
Compare
|
Rebased this onto current Verification on the updated head
GitHub now reports the PR as mergeable/clean. |
|
Holding for UX redesign — placement doesn't fit. Thank you for the careful implementation. The functional pieces are all there (3-pin cap, per-message pin/unpin, persisted in session JSON, mobile-aware) and the tests cover the right invariants. But the maintainer flagged a placement concern that needs to be reworked before merge. The issue The pinned-messages section currently lives inside the right-hand workspace panel, above the file tree. The workspace panel is for workspace files — it's where users browse This is the same reason we don't put profile settings inside the workspace panel — different concerns, different surfaces. What we'd like instead (Discord is the right mental model here) Discord handles pinned messages cleanly:
Concrete suggestions for this PR:
What stays as-is:
The backend work and the per-message UI are great — only the presentation surface needs to be reworked. What happens next
Either way, the functional foundation here is solid — this is purely a presentation question. Just want to make sure pinned messages get the right home before they ship. Thanks again for the careful work on this one. Looking forward to the next iteration. |
|
Addressed the placement feedback in follow-up commit
Verification:
|
Re-review: chat-header pin button looks like the right placementThanks for the rebuild @Michaelyklam. The follow-up commit I'll pull the updated branch, eyeball the popover behavior across desktop + mobile viewports, and either merge or post a focused redesign note. Removing the In the meantime, two pre-merge questions on the popover surface, not blocking:
I'll set up an isolated test environment and screenshot both states myself if not provided — just easier to compare against your design intent if you confirm them now. |
🎬 Cutter preview — PR #2534 |
|
Thanks for the careful work here @Michaelyklam — and apologies it sat after getting so close. Closing the core PR, but the feature isn't dead: we think message-pinning is a great fit for the extension system rather than core. The reasoning: pinning individual messages inside a transcript isn't something core's reference points ship — ChatGPT/Claude pin whole conversations in the sidebar (a different feature), and it's a frequently-requested-but-unshipped idea elsewhere. That puts it squarely in "optional, self-contained enhancement of the chat transcript" territory — exactly what Hermes WebUI's extension system (now fully live: a registry + one-click install in Settings → Extensions) is for. A pin button per message + a header popover is the kind of thing an extension injects cleanly, without a new persistent core field. We're planning to build a message-pinning extension (persisting pins client-side so it needs no core API), and your implementation here — the per-message pin UX, the 3-pin cap, the header popover, click-to-jump — is an excellent reference for it; you'll be credited. If you'd like to author the extension version yourself, we'd love that too. Closing the core PR as a core-vs-extension scoping decision, not a quality one. Genuinely appreciate the work and the responsiveness through the review. |


Thinking Path
Issue #2508 asks for a way to pin important conversation content inside a session. I kept the first slice session-scoped and bounded: no global bookmarks, no cross-session collections, and no broader transcript organization redesign.
What Changed
pinned_messagesmetadata to WebUI session JSON/compact rows.POST /api/session/message-pinto pin/unpin a message by session and message index, capped at three pins.Why It Matters
Users can keep a few important turns visible while working through a long conversation without copying them elsewhere or scrolling back repeatedly.
UI Media
Before — no pinned-message panel or per-message pin affordance:
After — pinned message preview opens from the chat header pin button, leaving the workspace panel for files only:
Verification
env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue2508_message_pins.py -q→ 5 passednode --check static/ui.jsenv -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m py_compile api/models.py api/routes.pygit diff --checkafter-header-pin-popover.pngshows the revised placement.Risks / Follow-ups
Closes #2508
Model Used
AI-assisted change with repository inspection, targeted editing, and shell-based test verification.