Skip to content

fix(messaging): render markdown and tappable mention/channel chips together#106

Merged
krazyjakee merged 2 commits into
masterfrom
claude/youthful-bouman-700cef
Jun 10, 2026
Merged

fix(messaging): render markdown and tappable mention/channel chips together#106
krazyjakee merged 2 commits into
masterfrom
claude/youthful-bouman-700cef

Conversation

@krazyjakee

Copy link
Copy Markdown
Contributor

Summary

  • Message content previously fell back to an inline-span renderer whenever a chip-eligible token was present, which silently dropped all markdown (so **bold** showed literal asterisks) and rendered mention/channel pills that weren't tappable.
  • Re-implements Accord's inline tokens (@user/@role/@everyone/#channel chips, custom :emoji:, ||spoiler||, __underline__) as markdown_viewer syntax extensions + element builders, so they render alongside the standard markdown stack instead of replacing it.
  • Mention/channel chips are now wired up: tapping a user mention opens the member popout, tapping a channel mention opens (or focuses) that channel's tab.

Changes

  • pubspec.yaml — promote dart_markdown + source_span from transitive to direct deps so message rendering can define custom inline syntaxes.
  • accord_message_markup.dart (new) — AccordMarkupContext + buildAccordMarkup(): five inline syntaxes/builders plus the tappable chip / emoji-image / spoiler widgets. Unresolved #channel / @handle tokens (and email-like email@host) stay plain text.
  • accord_markdown_box.dart — forward syntaxExtensions / elementBuilders through to MarkdownViewer.
  • accord_message_content.dart — rewritten to always use the markdown box, resolving handles against the space's member/role/channel/emoji caches and wiring the tap callbacks.

Notes

  • Channel-mention taps open/focus the channel tab but intentionally skip the NSFW gate and voice auto-join (those stay with the sidebar / message pane to keep this change focused).

Test plan

  • flutter analyze --no-fatal-infos — clean (only pre-existing infos in unrelated files)
  • flutter test — 132/132 pass, including 3 new widget tests in test/features/messaging/accord_message_markup_test.dart:
    • markdown + a #channel chip render together; the chip is tappable
    • @everyone chips while email@host stays plain text
    • unresolved #channel stays plain text (no chip)
  • Manual smoke test in the running app against a live Accord server (verified via widget tests only)

🤖 Generated with Claude Code

krazyjakee and others added 2 commits June 10, 2026 12:02
…gether

Message content previously fell back to an inline-span renderer whenever a
chip-eligible token was present, which silently dropped all markdown (so
`**bold**` showed its literal asterisks) and rendered mention/channel pills
that weren't tappable.

Re-implement Accord's inline tokens (`@user`/`@role`/`@everyone`/`#channel`
chips, custom `:emoji:`, `||spoiler||`, `__underline__`) as markdown_viewer
syntax extensions + element builders so they render *alongside* the standard
markdown stack instead of replacing it. Mention/channel chips are now wired to
open the member popout / focus the channel tab.

- Promote dart_markdown + source_span to direct deps (define custom syntaxes).
- Add accord_message_markup.dart: AccordMarkupContext + buildAccordMarkup().
- Forward syntaxExtensions/elementBuilders through AccordMarkdownBox.
- Rewrite AccordMessageContent to always use the markdown box and resolve
  handles against the space's caches.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@krazyjakee krazyjakee merged commit 9a2e792 into master Jun 10, 2026
5 checks passed
krazyjakee added a commit that referenced this pull request Jun 10, 2026
The markup channel-mention tap was kept from #106 during the master merge,
but #100 keys readStateControllerProvider by serverKey. Pass the active key
and refresh codegen so the family signature resolves.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
krazyjakee added a commit that referenced this pull request Jun 10, 2026
… markup, resizable channel column & space settings (#100)

* feat(channels): add channel & category context menus

Long-press (touch) and right-click (onSecondaryTap, desktop) on a
channel row or category header now open a context menu, mirroring the
existing space-rail menu pattern.

- Channel menu: Mark as read (when unread), Mute/Unmute (server-side via
  client.channels.mute/unmute), and — with manage_channels — Edit and
  Delete.
- Category menu: Expand/Collapse, and — with manage_channels — Create
  channel here, Edit, and Delete.

Reuses the existing edit/create dialogs and the header bell's mute
pattern; factors the delete confirmation into a shared
confirmAndDeleteChannel helper. Threads canManageChannels/spaceId into
_ChannelTile and _CategoryHeader (the latter is now a ConsumerWidget).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(ui): resizable channel column, anchored context menus, message actions & two-column space settings

- Resizable left channel column with width persisted across restarts
  (new channelListWidth setting + drag handle)
- Hover tooltip on message timestamps showing full date/time
- Mobile/desktop message actions menu via long-press / right-click,
  with multi-select demoted to a menu entry
- Shared showAccordContextMenu helper: anchored popups on desktop,
  bottom sheets on touch, applied across spaces/folders/members/
  channels/categories
- Two-column space settings layout on desktop, single column on mobile

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(messaging): use server-keyed read-state provider in mention tap

The markup channel-mention tap was kept from #106 during the master merge,
but #100 keys readStateControllerProvider by serverKey. Pass the active key
and refresh codegen so the family signature resolves.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@krazyjakee krazyjakee deleted the claude/youthful-bouman-700cef branch June 28, 2026 23:01
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