Skip to content

feat(mobile): add #channel autocomplete to compose bar#411

Merged
wesbillman merged 3 commits into
mainfrom
channel-autocomplete
Apr 28, 2026
Merged

feat(mobile): add #channel autocomplete to compose bar#411
wesbillman merged 3 commits into
mainfrom
channel-autocomplete

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • Adds #channel name autocomplete to the mobile compose bar, matching the desktop experience
  • Type # to see filtered channel suggestions (streams + forums, excludes DMs), select to insert #channel-name with trailing space
  • Toolbar # button inserts trigger at cursor position
  • Mutual exclusion with existing @mention autocomplete — only one can be active at a time
  • Refactored shared helpers (findTrigger, filterChannels, spliceAndMoveCursor, insertTriggerAtCursor) to reduce duplication between mention and channel patterns
  • Input highlighting skipped — Flutter's plain TextField doesn't support mixed inline styles; desktop uses TipTap's ProseMirror decoration system

Test plan

  • 26 unit tests for findTrigger, filterChannels, and spliceAndMoveCursor helpers
  • flutter analyze clean
  • All pre-commit and pre-push hooks pass (dart format, flutter analyze, biome check, cargo fmt, rust clippy, rust tests, desktop build)
  • Manual: type # in compose bar → channel suggestions appear
  • Manual: select a channel → #channel-name inserted correctly
  • Manual: type @ → mention suggestions appear, # suggestions dismissed
  • Manual: multi-word @mention (e.g. @Alice Smith) still works correctly

🤖 Generated with Claude Code

wesbillman and others added 3 commits April 27, 2026 17:42
Add channel name autocomplete to the mobile chat input, mirroring
desktop's #channel link feature. When users type # at a word boundary,
a filtered suggestion list of non-DM channels appears (up to 8 results,
case-insensitive substring match). Selecting a channel inserts
#channel-name with a trailing space.

- Detect # trigger via backward cursor walk with word-boundary check
- Mutual exclusion with existing @mention autocomplete
- _ChannelSuggestions widget with stream/forum type icons and labels
- # toolbar button for manual trigger (alongside existing @ button)
- Shared helpers: _findTrigger, _spliceAndMoveCursor, _insertTriggerAtCursor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gger

The refactored _findTrigger helper incorrectly stopped at spaces for all
triggers, breaking multi-word @mention queries like "@alice Smith". Now
accepts a stopAtSpace parameter: false for @ (only newlines stop the walk),
true for # (spaces and newlines, since channel names are kebab-case).

Also adds unit tests for findTrigger, filterChannels, and spliceAndMoveCursor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The channel detail page test expected exactly one hash icon, but the
new compose bar toolbar adds a second one. Relax to findsAtLeastNWidgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit f1cef90 into main Apr 28, 2026
13 checks passed
@wesbillman wesbillman deleted the channel-autocomplete branch April 28, 2026 04:42
tlongwell-block added a commit that referenced this pull request Apr 28, 2026
* origin/main:
  Add multi-workspace support to desktop app (#409)
  feat(mobile): add #channel autocomplete to compose bar (#411)
  fix: close race window that dropped active channel messages (#410)
  feat(pulse): rich text editor with @mentions, media uploads, and formatting (#407)
  feat(mobile): multi-workspace support (#408)
  feat: always notify on DM messages like Slack/Discord (#405)
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