Skip to content

fix(channels): replace stale channel query params - #1168

Open
baokimho wants to merge 1 commit into
ChatbotXIO:mainfrom
baokimho:fix/channel-picker-query-params
Open

baokimho wants to merge 1 commit into
ChatbotXIO:mainfrom
baokimho:fix/channel-picker-query-params

Conversation

@baokimho

Copy link
Copy Markdown

What

Fix channel selection on /channels/create so switching channels does not carry stale query state into the next attempt.

Previously, the picker appended a new channel value to the entire existing query string. This could:

  • carry a previous error into a new channel attempt
  • create duplicate channel parameters

Fix

InboxSelectCard now updates the query through URLSearchParams:

  • removes stale error
  • replaces the existing channel
  • preserves workspaceId
  • preserves other valid query parameters

Tests

Added regression coverage for:

  • preserving workspaceId
  • removing stale error
  • replacing an existing channel
  • ensuring only one channel parameter exists
  • selecting a channel with no existing query parameters
  • preserving unrelated query parameters

git diff --check passes.

Focused Vitest execution could not complete locally because of Windows pnpm/environment issues, not a code-level test failure.

Fixes #1155

Copilot AI lite review requested due to automatic review settings September 13, 2026 00:36
@github-actions github-actions Bot added the bug Something isn't working as expected label Sep 13, 2026

Copilot AI 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.

馃煝 Approval recommended

No unresolved issues block approval.

Pull request overview

Fixes stale query parameters when switching channels on /channels/create.

Changes:

  • Replaces existing channel values safely.
  • Removes stale error parameters while preserving valid query state.
  • Adds regression tests for query handling.
File summaries
File Summary
apps/builder/src/features/inboxes/components/inbox-select-card.tsx Normalizes channel-selection query parameters.
apps/builder/__tests__/inbox-select-card.test.tsx Adds regression coverage for query behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

2 participants