Skip to content

feat: add pinned messages - #117

Merged
steipete merged 19 commits into
openclaw:mainfrom
jjjhenriksen:codex/pinned-messages
Aug 2, 2026
Merged

steipete merged 19 commits into
openclaw:mainfrom
jjjhenriksen:codex/pinned-messages

Conversation

@jjjhenriksen

@jjjhenriksen jjjhenriksen commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add shared channel pins with SQLite/PostgreSQL persistence, export support, REST/SDK APIs, and durable pin.added / pin.removed events;
  • expose pin/unpin controls in timelines, touch sheets, and threads, with realtime refresh and persisted reload state;
  • keep the pinned panel channel-wide and independent of the active topic filter;
  • reuse timeline topic badges and resolved-mention rendering inside pinned messages;
  • show the current count against the documented 100-pin-per-channel ceiling and surface a clear maximum-100 error;
  • keep browser and desktop direct conversations free of pin controls;
  • regenerate the complete Go-embedded production web asset graph.

Product coherence

Topics organize the active timeline; pins remain a shared channel index across topics. Selecting a topic badge from a pinned message closes the panel and applies that timeline filter. Browser and desktop headers group notification preference and pin controls consistently, and their active states reflect the panel they actually own.

Exact-head behavior proof

On exact head b5b8b6a3739e4e3f7f6c957b0a8a0210c1c5e4a2, the focused real-server suite passed:

pnpm exec playwright test tests/e2e/pinned-messages.spec.ts --reporter=line
6 passed (13.3s)

The source-blind cross-topic scenario then passed independently in 7.4 seconds. It created two real channel topics, a stable workspace-bot handle, messages and pins in both topics, applied a timeline topic filter, and proved the panel still showed both pins with their topic badges, semantic mention rendering, and 2 / 100 pinned count. Clicking the other pinned topic badge closed the panel and changed the timeline filter.

Persistence and boundary proof:

go test ./apps/api/internal/store/sqlite -run 'TestPinnedMessage(LimitIsAtomic|Limit|Lifecycle)$' -count=10
passed

go test ./apps/api/internal/httpapi -run TestHTTPBotTokenWorkspaceIsolation -count=1
passed

The repeated SQLite final-slot race begins at 99 pins and produces exactly one success, one ErrPinnedMessageLimit, and 100 stored pins on every run.

Validation

The canonical build was repeated after review; both embedded HTML entrypoints reference the committed current asset graph.

@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jjjhenriksen
jjjhenriksen marked this pull request as ready for review July 26, 2026 03:38
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 26, 2026
@clawsweeper

clawsweeper Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 2, 2026, 6:03 PM ET / 22:03 UTC.

ClawSweeper review

What this changes

This branch implements shared channel-message pins with SQLite and PostgreSQL storage, REST and SDK contracts, durable realtime events, and web controls for pinning and viewing messages.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Current main still exposes only a “Pinned items” placeholder and has no pin API, persistence, or documentation, so the central capability remains necessary. The submitted real-server proof is strong, but this large new shared-state surface needs a maintainer product decision and one release-process correction before merge.

Priority: P2
Reviewed head: b5b8b6a3739e4e3f7f6c957b0a8a0210c1c5e4a2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real-behavior proof and broad regression coverage support a good patch, capped below A by the unresolved product decision, large cross-cutting merge surface, and release-owned changelog defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body reports an after-fix Playwright run against the real Go server and embedded web app, covering pin, realtime refresh, reload persistence, thread replies, and unpin behavior; redact private data if any future screenshots or logs are posted.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body reports an after-fix Playwright run against the real Go server and embedded web app, covering pin, realtime refresh, reload persistence, thread replies, and unpin behavior; redact private data if any future screenshots or logs are posted.
Evidence reviewed 6 items Current main lacks the requested implementation: Current main’s top bar shows a Pinned items control, but ChatApp handles it only by setting the status to “no pinned items”; the repository has no pin store/API paths or pin documentation.
Current main confirms the UI is only a placeholder: The current top bar still renders the Pinned items button and routes it through a callback, rather than a persisted pin feature.
Current scope documentation: Current workspace documentation explicitly lists pinned messages among intentionally missing channel capabilities, confirming this is new product work rather than a redundant implementation.
Findings 1 actionable finding [P2] Remove the release-owned changelog entry
Security None None.

How this fits together

ClickClack’s web client sends channel mutations to the Go API, which persists shared workspace and channel state in SQLite or PostgreSQL and emits durable realtime events. This PR introduces pins into that path so channel timelines, thread replies, and the pinned-items panel share durable pin state.

flowchart LR
  Member[Channel member] --> Web[Web and desktop chat]
  Web --> API[Go channel API]
  API --> Store[SQLite or PostgreSQL store]
  Store --> Pins[Shared pinned-message records]
  Store --> Events[Durable realtime events]
  Events --> Web
  Pins --> Panel[Pinned-items panel]
Loading

Decision needed

Question Recommendation
Should ClickClack adopt channel-wide shared pins with a fixed 100-message ceiling as a supported core collaboration feature? Sponsor shared channel pins: Approve the 100-pin shared-channel contract and merge after the release-owned changelog edit is removed and final checks complete.

Why: The patch adds persistent shared state, public API/SDK and realtime contracts, and a visible product workflow; correctness and proof do not determine whether this permanent product surface should be accepted.

Before merge

  • Remove the release-owned changelog entry (P2) - CHANGELOG.md is release-owned in this repository, so this normal feature PR should not add the unreleased entry or release attribution. Keep user-visible release context in the PR body and leave release notes to the release process.
  • Resolve merge risk (P1) - Merging adds a new durable shared channel-state contract across SQLite, PostgreSQL, API/SDK clients, exports, and realtime subscribers; its 100-pin policy and deletion semantics must remain compatible across upgrades.
  • Resolve merge risk (P1) - The branch changes 121 files and 7,548 additions, including generated web assets and database migrations; final merge-head CI must validate both fresh databases and existing-data upgrades.
  • Resolve merge risk (P1) - The diff edits release-owned CHANGELOG.md and includes release attribution text; that must not be merged through this normal feature PR.

Findings

  • [P2] Remove the release-owned changelog entry — CHANGELOG.md:3-6
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Changed surface 121 files; 7,548 additions; 439 deletions The feature spans storage, migrations, API/SDK contracts, realtime behavior, web UI, generated assets, tests, and docs.
Persistence backends 2 backends plus 4 new migrations SQLite and PostgreSQL must preserve identical pin semantics across fresh installs and upgrades.
Submitted runtime proof 1 focused Playwright scenario plus 133 E2E tests reported The PR body describes real server and embedded-app behavior rather than mock-only validation.

Merge-risk options

Maintainer options:

  1. Remove release-owned metadata and merge with upgrade proof (recommended)
    Drop the CHANGELOG.md edit, then merge only after the exact merge head proves SQLite and PostgreSQL migration, generated-query consistency, and pinned-state lifecycle behavior.
  2. Accept the full pins contract deliberately
    Maintainers may accept the new 100-pin shared-state API and lifecycle semantics after explicitly sponsoring the permanent collaboration feature.
  3. Pause pending product scope
    Pause this large cross-cutting change if shared pins are not a current core priority.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Remove the CHANGELOG.md edit; regenerate and verify sqlc output; run the focused pin migration, lifecycle, authorization, and end-to-end checks on the exact merge head.

Technical review

Best possible solution:

Land a narrowly scoped, maintainer-approved pins feature after removing release-owned changelog content and confirming migration, generated SQL, and current-main integration on the exact merge head.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature request; the submitted PR body provides a detailed real-server Playwright flow for the proposed behavior, but the central question is product acceptance rather than reproducing a defect.

Is this the best way to solve the issue?

Unclear until a maintainer sponsors the permanent shared-pin API and 100-message policy; once sponsored, the branch’s persistence-plus-realtime design is aligned with ClickClack’s existing channel architecture, subject to the release-owned changelog correction.

Full review comments:

  • [P2] Remove the release-owned changelog entry — CHANGELOG.md:3-6
    CHANGELOG.md is release-owned in this repository, so this normal feature PR should not add the unreleased entry or release attribution. Keep user-visible release context in the PR body and leave release notes to the release process.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b409a28f8ab4.

Labels

Label changes:

  • add merge-risk: 🚨 session-state: Pins are shared persistent channel state and must stay coherent through realtime events, reloads, deletions, and both database backends.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body reports an after-fix Playwright run against the real Go server and embedded web app, covering pin, realtime refresh, reload persistence, thread replies, and unpin behavior; redact private data if any future screenshots or logs are posted.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a meaningful collaboration feature with bounded user impact rather than an urgent production regression.
  • merge-risk: 🚨 compatibility: The PR introduces new REST, OpenAPI, SDK, and durable storage contracts that clients and upgrades must keep compatible.
  • merge-risk: 🚨 session-state: Pins are shared persistent channel state and must stay coherent through realtime events, reloads, deletions, and both database backends.
  • merge-risk: 🚨 other: The branch changes release-owned changelog metadata and a large generated embedded-client graph, which needs merge-head ownership and verification.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body reports an after-fix Playwright run against the real Go server and embedded web app, covering pin, realtime refresh, reload persistence, thread replies, and unpin behavior; redact private data if any future screenshots or logs are posted.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports an after-fix Playwright run against the real Go server and embedded web app, covering pin, realtime refresh, reload persistence, thread replies, and unpin behavior; redact private data if any future screenshots or logs are posted.

Evidence

What I checked:

  • Current main lacks the requested implementation: Current main’s top bar shows a Pinned items control, but ChatApp handles it only by setting the status to “no pinned items”; the repository has no pin store/API paths or pin documentation. (apps/web/src/ChatApp.svelte:4002, b409a28f8ab4)
  • Current main confirms the UI is only a placeholder: The current top bar still renders the Pinned items button and routes it through a callback, rather than a persisted pin feature. (apps/web/src/components/topbar/Topbar.svelte:123, b409a28f8ab4)
  • Current scope documentation: Current workspace documentation explicitly lists pinned messages among intentionally missing channel capabilities, confirming this is new product work rather than a redundant implementation. (docs/features/workspaces.md:131, b409a28f8ab4)
  • Relevant feature history: Current main reached adjacent topic, notification, and mention behavior through separate commits, while the supplied PR history retains dedicated pin-integration commits; pins remain a distinct capability. (apps/web/src/components/topbar/Topbar.svelte:123, b409a28f8ab4)
  • Repository policy applied: The full repository AGENTS.md requires SQL query/schema changes to be generated through sqlc rather than hand-maintaining generated storedb code. The PR body reports pnpm generate:sqlc passed, which should be confirmed by exact-head CI. (AGENTS.md:3, b409a28f8ab4)
  • Release provenance check: The supplied latest release is v0.2.1 at 244dda6; local main is b409a28 and does not contain the pin implementation. This is not an implemented-on-main close. (244dda650fcb)

Likely related people:

  • steipete: The supplied PR history attributes the pin/topic integration and regenerated embedded client to steipete, and current main still contains the pre-feature pin entry point. (role: recent area contributor; confidence: high; commits: 24c020bbf996, 2f2b25f411b9; files: apps/web/src/components/topbar/Topbar.svelte, apps/web/src/components/pins/PinnedPanel.svelte)
  • jjjhenriksen: Current main commits by jjjhenriksen own adjacent channel-notification and mention behavior reused by the pin panel, and the supplied history includes the original pin implementation. (role: recent adjacent contributor; confidence: high; commits: ca3c86ff6a8b, b409a28f8ab4, d8591ed81925; files: apps/web/src/ChatApp.svelte, apps/web/src/components/topbar/Topbar.svelte, apps/api/internal/store/postgres/sqlc/queries.sql)
  • PollyBot13: The supplied PR history credits focused lifecycle, PostgreSQL isolation, and rebase-refresh repairs for the pin implementation. (role: adjacent repair contributor; confidence: medium; commits: 878688b78a9a, a91089b6220a, 6455f69d9883; files: apps/api/internal/store/postgres/pins.go, apps/api/internal/store/postgres/pins_test.go)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Remove the release-owned CHANGELOG.md entry.
  • Have the product owner explicitly sponsor the shared-pin and 100-message contract.
  • Re-run migration and end-to-end checks against the exact merge head after that cleanup.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (38 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-02T05:09:15.649Z sha d26c11a :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T07:13:44.361Z sha d26c11a :: found issues before merge. :: [P1] Rebase and regenerate the embedded web bundle
  • reviewed 2026-08-02T12:47:43.181Z sha d26c11a :: found issues before merge. :: [P1] Rebase and regenerate the embedded web bundle
  • reviewed 2026-08-02T14:44:22.546Z sha 5f65957 :: found issues before merge. :: [P1] Rebase and regenerate the embedded web bundle
  • reviewed 2026-08-02T15:20:41.171Z sha 22a9a1b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T18:22:16.767Z sha 22a9a1b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T19:45:55.231Z sha 22a9a1b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T21:50:04.878Z sha 22a9a1b :: needs maintainer review before merge. :: none

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea11592ede

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return
}

pin, event, err := s.store.PinMessage(r.Context(), channelID, body.MessageID, act.user.ID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Enforce the bot token's workspace before accessing pins

When a bot identity belongs to multiple workspaces, a token issued for workspace A can reach this store call with a channel from workspace B and read or mutate B's shared pins, because membership checks use only act.user.ID. The existing bot-token isolation test models this exact multi-workspace identity, and other channel handlers call requireBotChannelWorkspace; apply the same guard in all three pin handlers before invoking the store.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/ChatApp.svelte Outdated
Comment on lines +2824 to +2825
if (event.type === "message.deleted" && pinnedMessageIDs.has(event.payload.message_id || "")) {
await loadPinnedMessages();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh pins after pinned messages are edited

When a pinned message is edited while the pin panel is open, message.updated reloads the timeline but this invalidation only refreshes pins for message.deleted. Because pinnedMessages contains separately fetched message objects, the panel continues displaying the old body and attachments until another pin event, channel navigation, or manual panel reload; refresh or update the pin cache for message.updated as well.

Useful? React with 👍 / 👎.

Comment on lines +2755 to +2759
(event.type === "pin.added" || event.type === "pin.removed") &&
event.channel_id === selectedChannelID &&
!selectedDirectID
) {
await loadPinnedMessages();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reload pins during authoritative realtime resyncs

When the realtime wrapper forces an authoritative resync after an unusable cursor, it advances to the current tail instead of replaying missed events, but the resync reloads messages and channel data without reloading pinnedMessages. Consequently pin changes made during the gap remain stale in an open panel and in message-menu pin labels; the pin-event handler cannot repair this because those events were intentionally skipped, so include the active channel's pins in reconcileRealtimeState.

Useful? React with 👍 / 👎.

Comment on lines +3641 to +3643
channelID={selectedChannelID}
{pinnedMessageIDs}
onTogglePin={toggleMessagePin}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose pin actions for thread replies

The pin state and toggle callback are wired only into MessageList, while channel thread replies are rendered separately by ThreadPanel, which receives neither prop and offers no pin control. The store accepts replies because they retain the channel ID, and the new pinned-panel navigation explicitly handles parent_message_id, so users can view API-created reply pins but cannot create or toggle them through the app; pass the same pin state and callback into the thread surface.

Useful? React with 👍 / 👎.

Comment on lines +154 to +155
for _, row := range rows {
message, err := getMessage(ctx, s.db, row.MessageID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Batch pinned-message retrieval

For a channel at the supported 100-pin limit, every list request performs the initial pin query and then up to 100 sequential getMessage queries; on PostgreSQL this adds a database round trip per pin before attachment and reaction hydration and can make opening the panel disproportionately slow. Return the complete message rows with one typed sqlc query, or batch-fetch all selected IDs, while preserving the pin ordering.

AGENTS.md reference: AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

@jjjhenriksen
jjjhenriksen force-pushed the codex/pinned-messages branch from ea11592 to 7d352a1 Compare July 26, 2026 05:38
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 7d352a14e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 26, 2026
@jjjhenriksen
jjjhenriksen force-pushed the codex/pinned-messages branch from 7d352a1 to fe4e99c Compare July 26, 2026 05:58
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe4e99c6d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
defer tx.Rollback()

msg, err := getMessageTx(ctx, tx, messageID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Lock the message before validating its deletion state

In PostgreSQL, when DeleteMessage commits after this unlocked getMessageTx read but before the pin insert, this transaction can still insert a pin and emit pin.added for the now-deleted message. The new pin is then immediately absent from ListPinnedMessages because that query filters m.deleted_at IS NULL, despite the POST having returned 201. Lock the message row through the validation/insert or make the insert conditional on the message remaining undeleted.

Useful? React with 👍 / 👎.

@jjjhenriksen
jjjhenriksen force-pushed the codex/pinned-messages branch from fe4e99c to d8591ed Compare July 26, 2026 06:13
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@codex review

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8591ed819

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!channelID || !onTogglePin || pinSaving) return;
pinSaving = true;
try {
await onTogglePin(message, pinnedMessageIDs.has(message.id));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle pin failures in the thread panel

When the pin request is rejected—for example, with the expected 409 after the channel reaches 100 pins—or the network fails, onTogglePin rejects and this try/finally propagates the error. The toolbar explicitly discards that promise, so users receive an unhandled rejection with no visible explanation, while the action-sheet path remains open without reporting why the operation failed. Catch the error and expose a status as MessageRow does for the same action.

Useful? React with 👍 / 👎.

pinnedPanelOpen = false;
return;
}
if (!selectedChannelID || selectedDirectID) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable pinned-items controls outside channels

When a direct message or an empty workspace is selected, both top-bar variants still present an enabled “Pinned items” button, but this branch silently returns because pins are channel-only. The previous top-bar stub at least reported that there were no pinned items, while the new desktop control also routes here, so these contexts now expose a control that appears operable but has no effect. Hide or disable the control when there is no selected channel, or provide explicit unsupported-state feedback.

Useful? React with 👍 / 👎.

Comment on lines +2827 to +2830
(event.type === "message.updated" || event.type === "message.deleted") &&
pinnedMessageIDs.has(event.payload.message_id || "")
) {
await loadPinnedMessages();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Synchronize pins after local message mutations

If this client successfully edits or deletes a pinned message over HTTP while its WebSocket is disconnected or blocked, the local mutation handlers update messages, replies, and selectedThread but never update pinnedMessages. This realtime-only refresh therefore never runs, leaving edited text stale and deleted messages visible in the pinned panel indefinitely until a later reconnect or reload. Update or remove the corresponding pinned entry as part of the successful local mutation path rather than relying exclusively on the echoed event.

Useful? React with 👍 / 👎.

…s-lifecycle

# Conflicts:
#	apps/api/internal/webassets/dist/200.html
#	apps/api/internal/webassets/dist/_app/immutable/entry/app.C0jTAm08.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/0.erneJbxK.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/11.BPwHOykE.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/11.COwgNK6M.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/11.vvKR-XrD.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/12.D2jzbKVo.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/13.0lkaA9sE.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/3.BoPssj0u.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/4.B1Q5W4BL.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/4.CV83zLxh.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/4.D81lYOij.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/5.C04PopFT.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/5.DW2e0mkr.js
#	apps/api/internal/webassets/dist/_app/immutable/nodes/5.gnDXXEBJ.js
#	apps/api/internal/webassets/dist/index.html
@PollyBot13

Copy link
Copy Markdown
Contributor

I reproduced the current conflict and opened a narrow refresh PR for Jacqueline: jjjhenriksen#3

The only conflicts were generated web assets. The assistance branch merges current main at 3205c07, regenerates the embedded bundle, and is mergeable. Full pnpm check passes; all 5 pinned-message Playwright scenarios pass; an independent cold review found no issues. It does not alter the pin API/schema/100-pin policy, so the remaining product-contract decision stays with maintainers.

After #3 merges, this upstream PR can receive a fresh exact-head review.

@PollyBot13

Copy link
Copy Markdown
Contributor

The previous refresh merged, but upstream main advanced again immediately afterward with the 0.2.2 dependency/generated-output update. I opened a second narrow refresh for the now-current release head: jjjhenriksen#4

It merges 72931b10f083dc7547b7fcfdf49235b8d5e90e0b, resolves only generated web-asset conflicts, and regenerates the embedded bundle. All 5 pinned-message Playwright scenarios pass against the real Go server and embedded app; typecheck, lint, format, desktop, FakeCo, repeatable generation, and independent review pass. The one broad-check failure is an unchanged current-main macOS file-mode test and is documented in the assistance PR.

No fresh ClawSweeper review is requested yet; that should wait until #4 is merged and this PR has the resulting literal head.

…resh-2

chore: refresh pinned messages onto release main
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 2, 2026
PollyBot13 and others added 2 commits August 2, 2026 14:04
Expose the existing topic model in the web composer and timeline with resilient filtering, draft recovery, and paginated API support.

Co-authored-by: PollyBot13 <pollybot13@gmail.com>
Add one persisted per-channel notification preference across browser, desktop, Pushover, API, and SDK surfaces, with resolved mention metadata and authorized thread-message hydration.

Co-authored-by: Jacqueline Henriksen <jjjhenriksen@gmail.com>
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. labels Aug 2, 2026
jjjhenriksen and others added 7 commits August 2, 2026 14:51
Highlight resolved workspace mentions across normal, threaded, embedded, and agent-preamble renderers, with stronger current-user attention governed by the canonical channel notification preference.

Co-authored-by: Jacqueline Henriksen <jjjhenriksen@gmail.com>
Keep the pinned panel channel-wide under topic filters, reuse topic and mention presentation, expose the 100-pin ceiling, and make channel tool ownership explicit.\n\nCo-authored-by: Jacqueline Henriksen <jjjhenriksen@gmail.com>\nCo-authored-by: PollyBot13 <pollybot13@gmail.com>
Regenerate the complete Go-served asset graph for the reviewed pin integration.\n\nCo-authored-by: Jacqueline Henriksen <jjjhenriksen@gmail.com>\nCo-authored-by: PollyBot13 <pollybot13@gmail.com>
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 2, 2026
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Exact-head b5b8b6a3739e4e3f7f6c957b0a8a0210c1c5e4a2 is green and live-proven:

The pinned panel remains channel-wide under topic filters, retains topic and mention presentation, shows its n / 100 ceiling, and keeps pin controls out of browser and desktop DMs.

@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

Exact-head current-main refresh, full embedded bundle, six-scenario pin proof, topic-filter independence, mention/topic presentation, and the visible 100-pin ceiling are now attached for b5b8b6a3739e4e3f7f6c957b0a8a0210c1c5e4a2.

@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 961e46f into openclaw:main Aug 2, 2026
13 checks passed
@jjjhenriksen
jjjhenriksen deleted the codex/pinned-messages branch September 27, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants