fix: route channel references across clients - #4701
Conversation
5051a99 to
233bae3
Compare
Signed-off-by: npub1em3jmyn4vu57urqf03txrwreccvejvwdy5c4er8nnrwt7rc4tncscs3ssu <cee32d92756729ee0c097c5661b879c6199931cd25315c8cf398dcbf0f155cf1@buzz.block.builderlab.xyz>
233bae3 to
af93481
Compare
Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc16416431
ℹ️ 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".
| segment = segment.replaceAllMapped( | ||
| RegExp(r'(?<![(\]=])https?://[^\s)>\]]+'), | ||
| RegExp( | ||
| r'(?<![(\]=])(?:https?://|buzz://(?:message\?|join\?))[^\s)>\]]+', |
There was a problem hiding this comment.
Exclude sentence punctuation from bare Buzz links
When a bare link ends a sentence, this character class includes trailing punctuation such as ., ,, or ! in the generated destination. For example, See buzz://message?channel=c&id=abc. is parsed with message ID abc., which deep_link_dispatcher.dart passes unchanged to ChannelDetailPage, so the target event cannot be loaded; join links similarly receive a corrupted invite code. Strip prose punctuation from the matched URL or add boundary handling and cover the sentence-ending case.
AGENTS.md reference: AGENTS.md:L179-L187
Useful? React with 👍 / 👎.
Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 685344ec0b
ℹ️ 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; | ||
| }; | ||
| activate_main_window(app); | ||
| let _ = app.emit("deep-link-channel", payload); |
There was a problem hiding this comment.
Queue channel links until the router listener mounts
When buzz://channel/... launches a stopped desktop app, or arrives before the authenticated AppShell mounts, this arm only emits a transient Tauri event. The cold-start callback in desktop/src-tauri/src/lib.rs is registered during native setup, while useMessageDeepLinks() does not subscribe until the later AppShell render, so the channel target can be discarded before JavaScript observes it and the link merely focuses the app. Persist and drain channel targets as the existing connect/join queue does.
Useful? React with 👍 / 👎.
🤖
Summary
Make channel references consistently navigable across Buzz clients. The canonical standalone form is
buzz://channel/<channel-uuid>; bare URLs, angle-bracket autolinks, explicit Markdown links, and resolved#channelreferences now open that channel in-app.Mobile and desktop share the existing channel navigation/backfill paths for channel, message, and thread links. Desktop also handles OS-launched channel URLs through Tauri. Strict parsers reject malformed, ambiguous, or non-UUID channel forms as inert text and canonicalize accepted UUIDs before lookup.
Related issue
None found.
Testing
bin/just desktop-cibin/just desktop-tauri-testbin/just mobile-fixbin/just mobile-test685344ec0bb558eba933e6d33b4a439d593929e4: desktop checks/tests, mobile tests, Rust tests, and Tauri checks all passed