Skip to content

fix(channels): strip leading hash prefixes from names#2250

Merged
loganj merged 5 commits into
block:mainfrom
loganj:buzz-bug-hash-channels
Jul 23, 2026
Merged

fix(channels): strip leading hash prefixes from names#2250
loganj merged 5 commits into
block:mainfrom
loganj:buzz-bug-hash-channels

Conversation

@loganj

@loganj loganj commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

🤖

Summary

  • Strip every leading # from channel names so clients render #channel instead of ##channel.
  • Apply the same canonicalization to channel creation and rename operations across the shared core, database boundary, SDK, and Desktop event builders.

Details

  • Preserve # characters that appear after the start of a channel name.
  • Reject names made only of hash prefixes or whitespace after canonicalization.
  • Keep existing persisted channel names unchanged until they are renamed.

@loganj
loganj marked this pull request as ready for review July 21, 2026 23:38
@loganj
loganj requested a review from a team as a code owner July 21, 2026 23:38

@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: a71560f048

ℹ️ 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".

Comment thread crates/buzz-core/src/channel.rs Outdated
loganj added 2 commits July 22, 2026 07:56
Signed-off-by: Logan Johnson <loganj@squareup.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the buzz-bug-hash-channels branch from 4cb21bf to 990bffd Compare July 22, 2026 14:57

@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: 990bffd658

ℹ️ 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".

Comment thread crates/buzz-core/src/channel.rs Outdated
Signed-off-by: npub1z3hmzc9ryehxzedl5wzlvpyvja0d483peaja5zt6pd0209f9x2jspe2dxh <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
@loganj
loganj enabled auto-merge (squash) July 22, 2026 23:55

@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: 5364463d19

ℹ️ 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".

Comment thread desktop/src-tauri/src/events.rs
Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>

@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: ae8c247186

ℹ️ 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".

Comment thread desktop/src/features/channels/ui/ChannelBrowserDialog.tsx
Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
const deferredQuery = React.useDeferredValue(query.trim().toLowerCase());
const trimmedQuery = query.trim();
const canonicalQuery = canonicalChannelName(query);
const deferredQuery = React.useDeferredValue(canonicalQuery.toLowerCase());

@atishpatel atishpatel Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P2] Canonicalize legacy names before scoring search results

This canonicalizes the query, but scoreChannelMatch still scores each raw channel name. With legacy #general plus general-chat, searching for #general gives the intended legacy channel a substring score (4) while general-chat gets a prefix score (1), so Enter opens the wrong channel even though the duplicate guard recognizes #general as an exact match. Please canonicalize channel.name for scoring too.

@loganj
loganj merged commit d0ab3fd into block:main Jul 23, 2026
32 checks passed
@loganj
loganj deleted the buzz-bug-hash-channels branch July 23, 2026 19:45
yoamomonstruos added a commit that referenced this pull request Jul 23, 2026
…arch

* origin/main:
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  feat(dev): add `just production` recipe targeting the production relay (#2572)
  chore: Omit the Model control when an optional-model harness has nothing to select (#2262)
  fix(ci): stop moving protected Sprig rolling tag (#2221)
  fix(media): sanitize animated image uploads (#2524)
  fix(desktop): populate team instructions when opening the edit team dialog (#2565)
  feat(desktop): add drag-to-reorder for community rail (#2549)
  fix(channels): strip leading hash prefixes from names (#2250)
  fix(desktop): allow skipping harness setup onboarding (#2360)
  Script cleanup
  feat(relay): make Redis pool size configurable, default 16 (#2521)

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	desktop/src-tauri/src/commands/profile.rs
brow pushed a commit that referenced this pull request Jul 23, 2026
…obile-releasing

* origin/main: (23 commits)
  Gate default relay auto-connect behind release flag (#2589)
  fix(desktop): fast-track relay restart reconnects (#2579)
  fix(sharing): preserve agent/team snapshot tEXt chunks through media sanitization (#2438)
  fix(acp): restrict DM turns to owner and verified siblings (#2591)
  test(desktop): live relay kill/restart reconnect gate (#2583)
  fix(relay): send 1012 restart close to all clients on graceful drain (#2575)
  fix(desktop): retry failed initial relay dials (#2564)
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  feat(dev): add `just production` recipe targeting the production relay (#2572)
  chore: Omit the Model control when an optional-model harness has nothing to select (#2262)
  fix(ci): stop moving protected Sprig rolling tag (#2221)
  fix(media): sanitize animated image uploads (#2524)
  fix(desktop): populate team instructions when opening the edit team dialog (#2565)
  feat(desktop): add drag-to-reorder for community rail (#2549)
  fix(channels): strip leading hash prefixes from names (#2250)
  fix(desktop): allow skipping harness setup onboarding (#2360)
  Script cleanup
  ...
brow pushed a commit that referenced this pull request Jul 23, 2026
…obile-releasing

* origin/main: (23 commits)
  Gate default relay auto-connect behind release flag (#2589)
  fix(desktop): fast-track relay restart reconnects (#2579)
  fix(sharing): preserve agent/team snapshot tEXt chunks through media sanitization (#2438)
  fix(acp): restrict DM turns to owner and verified siblings (#2591)
  test(desktop): live relay kill/restart reconnect gate (#2583)
  fix(relay): send 1012 restart close to all clients on graceful drain (#2575)
  fix(desktop): retry failed initial relay dials (#2564)
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  feat(dev): add `just production` recipe targeting the production relay (#2572)
  chore: Omit the Model control when an optional-model harness has nothing to select (#2262)
  fix(ci): stop moving protected Sprig rolling tag (#2221)
  fix(media): sanitize animated image uploads (#2524)
  fix(desktop): populate team instructions when opening the edit team dialog (#2565)
  feat(desktop): add drag-to-reorder for community rail (#2549)
  fix(channels): strip leading hash prefixes from names (#2250)
  fix(desktop): allow skipping harness setup onboarding (#2360)
  Script cleanup
  ...

Signed-off-by: npub1re830n24qhgstulznk5dxdluccspxkxxdq643lm4q3zwwwjgsuqqmcmdrm <1e4f17cd5505d105f3e29da8d337fcc6201358c6683558ff750444e73a488700@buzz.block.builderlab.xyz>
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.

2 participants