fix(channels): unify the messaging default-channel selector into one grid#4109
Conversation
…grid The Messaging settings panel rendered the channel list twice — a grid of connect/configure tiles plus a separate "Default Messaging Channel" button list, both labeled the same — so it was unclear which one set the default. Collapse them into a single horizontal-card grid where each tile shows connection status, opens setup on click, and owns the default selection: - icon on the left; name -> status -> default control stacked on the right - "Set as default" appears only on connected channels; the current default shows a Default badge plus a primary ring on the tile - connected and not-connected channels render as two separate rows - Web stays selectable (always available) Add channels.setAsDefault / channels.defaultBadge i18n keys across all locales. Update channel-grid unit tests and the e2e/playwright specs that switched the default (now via the always-connected Web tile).
📝 WalkthroughWalkthroughChannels default controls were added to each channel tile, the page now separates connected and disconnected grids, new locale strings were introduced, and unit plus end-to-end tests were updated for the default-channel flow. ChangesChannels default selection flow
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 917f3f1171
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // into one place. "Set as default" only appears for channels you can actually | ||
| // route through (connected); the default badge still shows on whichever | ||
| // channel is persisted as default, connected or not. | ||
| const showDefaultControl = isDefault || isConnected; |
There was a problem hiding this comment.
Keep backend-only channels selectable as defaults
In the macOS iMessage path, core still advertises imessage from channels_list (src/openhuman/channels/controllers/definitions.rs:310-318), but the frontend ChannelType/KNOWN_CHANNEL_TYPES omit it (app/src/types/channels.ts:1-15), and useChannelDefinitions skips status entries that fail that guard (app/src/hooks/useChannelDefinitions.ts:92-97). That means even a configured iMessage channel reaches this line with isConnected === false; because it is normally not already the default, the unified grid no longer renders any channel-select-imessage control. The removed selector rendered a button for every channelDefs entry, so this regresses users who want to make configured iMessage the default.
Useful? React with 👍 / 👎.
Summary
The Messaging settings panel rendered the channel list twice — a grid of connect/configure tiles plus a separate "Default Messaging Channel" button list, both labeled the same — so users couldn't tell which one actually set the default (the two even covered different channel sets).
This collapses them into a single horizontal-card grid where each tile shows connection status, opens setup on click, and owns the default selection:
Before → After
Changes
app/src/pages/Skills.tsx—ChannelTileredesigned (horizontal layout, connected-only "Set as default", default badge + ring); the channels tab now renders connected/not-connected as two grids; removed the duplicate selector list.channels.setAsDefault/channels.defaultBadgeacross all 14 locales (real translations).Skills.channels-grid.test.tsxupdated + new cases (connected-only control, connected-first grouping). The e2e/playwright "switch default channel" specs now switch via the always-connected Web tile (disconnected channels no longer expose the control), pre-setting Telegram as default so Web becomes a connected, non-default tile.Test plan
pnpm typecheckpassespnpm lintpasses (0 errors)pnpm formatappliedpnpm i18n:checkpasses (full parity across 14 locales)Skills.channels-grid.test.tsx7/7; fullpages/__tests__suite 225/225