Skip to content

feat(editing)!: scope recent-messages picker to a chosen channel - #123

Merged
StephenTangCook merged 1 commit into
mainfrom
claude/busy-stonebraker-f04850
Jun 30, 2026
Merged

feat(editing)!: scope recent-messages picker to a chosen channel#123
StephenTangCook merged 1 commit into
mainfrom
claude/busy-stonebraker-f04850

Conversation

@StephenTangCook

Copy link
Copy Markdown
Contributor

What

The editor's load dialog now scopes its "recent messages" picker to a single channel the user picks, instead of fetching recent editable messages across the whole workspace.

  • EditingConfig.loadRecentMessages now takes a channelId: (channelId: string) => Promise<RecentMessage[]>.
  • The load dialog presents a required channel selector (reusing the existing loadChannels prop, no new prop) under "or pick a recent message". Only after a channel is selected does it call loadRecentMessages(channelId) and render that channel's results.
  • Changing the channel re-fetches. Loading / empty / error states render per channel (a thrown error renders as an error, consistent with loadChannels failures).
  • The paste-a-link path (onLoadMessage) is unchanged.

Breaking change

loadRecentMessages gains a required channelId argument. Hosts passing it must update the signature.

Demo

The mocked-Slack demo filters its in-memory fixtures to the selected channel; fixtures span channels so each editability outcome stays demonstrable per channel.

Tests / docs

  • New test/load-message-dialog.test.tsx: requires a selection before listing, scopes per channel, re-fetches on change, empty + thrown-error states.
  • README + TSDoc updated for the new signature and channel-select flow.

Verification

  • tsc clean, full suite (359 existing + 3 new) green, biome clean.
  • Verified live in the demo: picking #general lists its message; switching to #random shows the per-channel empty state; no console errors.

Out of scope: the host (tightknit-app) side, whose engine already accepts an optional channelId and will pass the selected channel once this version ships.

🤖 Generated with Claude Code

The load dialog's "recent messages" picker now requires the user to pick a
channel first (reusing the existing `loadChannels`), then calls
`loadRecentMessages(channelId)` scoped to that one channel instead of scanning
the whole workspace. Changing the channel re-fetches; loading/empty/error
states render per channel. The paste-a-link path is unchanged.

BREAKING CHANGE: `EditingConfig.loadRecentMessages` now takes a `channelId`
argument: `(channelId: string) => Promise<RecentMessage[]>`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
block-kitchen 6ed0ad7 Commit Preview URL

Branch Preview URL
Jun 30 2026, 05:00 AM

@StephenTangCook
StephenTangCook merged commit 7e9f7cd into main Jun 30, 2026
13 checks passed
@StephenTangCook
StephenTangCook deleted the claude/busy-stonebraker-f04850 branch June 30, 2026 05:02
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.

1 participant