Conversation
… merge Co-authored-by: Haze <hazeone@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f121e771a
ℹ️ 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".
| .map((account) => account.accountId) | ||
| .filter((accountId): accountId is string => typeof accountId === 'string' && accountId.trim().length > 0); | ||
| const runtimeAccountIds = runtimeAccounts.reduce<string[]>((acc, account) => { | ||
| const accountId = typeof account.accountId === 'string' ? account.accountId.trim() : ''; |
There was a problem hiding this comment.
Preserve account ID canonical form during runtime merge
Trimming account.accountId here changes the identifier used for downstream matching, but account IDs are not normalized on write (/api/channels/config passes body.accountId through, and saveChannelConfig stores it as-is). If an ID with surrounding whitespace exists (from API clients or existing config), this branch now converts it (e.g. ' foo ' → 'foo'), so configuredAccountIdSet membership and the later runtimeAccounts.find(...) lookup no longer align with the stored/runtime key. That can surface duplicate/phantom accounts with incorrect configured/status fields instead of the real runtime snapshot.
Useful? React with 👍 / 👎.
This pull request contains changes generated by a Cursor Cloud Agent