Skip to content

Qualify Discord one-step binding and complete QA setup - #1618

Merged
DoodleBears merged 7 commits into
mainfrom
codex/1123-discord-binding-qualification
Oct 14, 2026
Merged

DoodleBears merged 7 commits into
mainfrom
codex/1123-discord-binding-qualification

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1123 · Closes #1107 · #1123 claim · parent closure claim · Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393

Why the change

Discord needs reusable private QA configuration and accurate binding guidance, with installed-package evidence that the maintained checked App is discoverable, can bind in one step, and receives/replies in the original channel.

Special things to note

Change outline

Private reusable QA setup

Agent verifies App + designated server/channel metadata
  ↓ protected machine-local registry; Lark/Slack records preserved
setup discord [QA1|QA2|QA3]
  → one hidden Token prompt; Enter retains the saved Token
  → readiness pending; no inferred receiver-window lease
  → optional --manual fallback for full three-stage configuration

loadDiscordImTestApp(slot) → private credentials + string IDs
list discord → names/readiness only; no Token, IDs or idle claim

The locked wizard library is unchanged. Unicode name validation accepts Chinese names independently of the Bash locale. Setup does not create Apps, reset Tokens, change permissions, set GitHub secrets or start receivers. Provider authentication and current task authorization remain separate from saved metadata.

Three Discord binding states — 1280 × 800

 Bind app: selected Discord / ready / no conversations
- Generic DM and group-mention guidance
+ Server-channel/existing-public-thread @mention guidance
+ Original-location replies; Discord DMs are not supported yet

Before is main e363a647; after is runtime head a457b52b. Both are actual installed Clients, run serially with the same Bot/App and zero conversations. Native language selection and body theme tokens were used. Capture involved no external message. Provenance and comparison index.

Chinese / light

State Before After
Discord selected Before: Discord selected, zh/light After: Discord selected, zh/light
Binding ready Before: Binding ready, zh/light After: Binding ready, zh/light
Empty conversation list Before: Empty conversation list, zh/light After: Empty conversation list, zh/light

Chinese / dark

State Before After
Discord selected Before: Discord selected, zh/dark After: Discord selected, zh/dark
Binding ready Before: Binding ready, zh/dark After: Binding ready, zh/dark
Empty conversation list Before: Empty conversation list, zh/dark After: Empty conversation list, zh/dark

English / light

State Before After
Discord selected Before: Discord selected, en/light After: Discord selected, en/light
Binding ready Before: Binding ready, en/light After: Binding ready, en/light
Empty conversation list Before: Empty conversation list, en/light After: Empty conversation list, en/light

English / dark

State Before After
Discord selected Before: Discord selected, en/dark After: Discord selected, en/dark
Binding ready Before: Binding ready, en/dark After: Binding ready, en/dark
Empty conversation list Before: Empty conversation list, en/dark After: Empty conversation list, en/dark

Native final acceptance

real Client Bind app → receiving Binding, Grant 0, Outbox 0
@ request → one Source → one handled group-mention Admission
  → one checked original-location Outbox → exact native marker reply
unmentioned negative → zero Source, Admission, Outbox or reply
first admitted conversation → one implicit Grant, visible in Client

Final original Discord channel: exact reply and ignored negative

Final native conversation row

The Human granted a bounded ten-hour QA1 window and the two final cases. Full BH_1123_FINAL_AT_20261014_OK matched in the signed-in original channel; native REST verified Bot author and reply reference. The unmentioned marker remained unadmitted/unanswered for more than 90 seconds. Source/Admission/Outbox agree. Host stopped; process and port absent. No permission changes or repeated first marker. Exact artifacts and complete native evidence.

Bundle verification isolation

 await build({
   ...clientBundleOptions,
+  config: false,
   outDir: tempDir,
 });

The existing contract test was also discovering the multi-output root config and building the same overridden entry repeatedly into one directory. Base/head reproduction caught missing CSS or invalid output; explicit inline configuration now runs one build and retains all six assertions. Runtime build configuration is unchanged.

Verification: 34 integrated registry/identity/conversation tests and six bundle assertions pass on Windows; 28 exact Provider-source Discord tests passed. Full Linux and official CI include all 4,713 tests, lint, formatting, typecheck, build and docs preparation. Bilingual release fragments pass. No merge or publication is performed.

Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a59c035-8fb8-4364-9759-12a98c8e23e7
📥 Commits

Reviewing files that changed from the base of the PR and between e363a64 and 6c4c68c.

⛔ Files ignored due to path filters: 30
  • docs/assets/pr/1123-discord-bind-ready.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-bind-selected.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-conversations-empty.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-final-channel.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-final-conversation.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-original-channel.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-empty-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-empty-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-empty-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-empty-zh-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-ready-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-ready-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-ready-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-ready-zh-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-selected-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-selected-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-selected-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/base-selected-zh-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-empty-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-empty-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-empty-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-empty-zh-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-ready-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-ready-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-ready-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-ready-zh-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-selected-en-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-selected-en-light.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-selected-zh-dark.png is excluded by !**/*.png
  • docs/assets/pr/1123-discord-pairs/head-selected-zh-light.png is excluded by !**/*.png
📒 Files selected for processing: 15
  • README.en.md
  • README.md
  • changes/1123-discord-binding-scope.md
  • changes/1123-discord-qa-apps.md
  • docs/agents/im-test-apps.md
  • docs/evidence/issue-1123/discord-package-qualification.md
  • docs/evidence/issue-1123/ui-comparison.md
  • packages/client/src/client/external-conversations.tsx
  • packages/client/src/client/external-identity-list.tsx
  • packages/client/src/client/locale.ts
  • packages/client/test/client-bundle.test.ts
  • packages/client/test/external-identity-list.test.ts
  • scripts/dev-im-test-apps.mjs
  • scripts/setup-discord-test-app.sh
  • scripts/test/dev-im-test-apps.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The PR adds Discord-specific binding guidance in the client and a QA setup wizard for reusable Discord slots. It also updates setup instructions and changelogs, adds tests, and records Discord binding qualification and UI comparisons.

Changes: Discord binding guidance

Layer / File(s) Summary
Discord-specific client guidance
packages/client/src/client/*, packages/client/test/external-identity-list.test.ts
The client uses Discord-specific messages for binding, readiness, and empty-conversation states. The tests check server-channel and public-thread guidance and verify that private-chat guidance is absent.
Binding qualification and UI evidence
changes/1123-discord-binding-scope.md, docs/evidence/issue-1123/*, packages/client/test/client-bundle.test.ts
The changelog describes the supported mention scope. The qualification record and UI comparisons document test runs, screenshots, and results. The client bundle test disables tsdown configuration discovery.

Discord QA app setup

Layer / File(s) Summary
QA slot registry and CLI
scripts/dev-im-test-apps.mjs, scripts/test/dev-im-test-apps.test.mjs
The CLI can list and set up Discord QA slots. The registry validates slot fields and IDs, reports readiness metadata without credentials, and preserves other platform records. Tests cover loading, listing, and validation.
Setup wizard and tests
scripts/setup-discord-test-app.sh, scripts/test/dev-im-test-apps.test.mjs
The wizard supports token-only and manual setup. It validates and saves slot details, records readiness, and does not start a receiver. Tests cover setup modes, token handling, and missing metadata.
Setup instructions
README.md, README.en.md, docs/agents/im-test-apps.md, changes/1123-discord-qa-apps.md
The documentation describes Discord QA slots, token handling, permissions, and receiver coordination. The changelog records the setup flow.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor Developer
  participant CLI as dev-im-test-apps.mjs
  participant Wizard as setup-discord-test-app.sh
  participant Registry as Machine-local QA app registry
  Developer->>CLI: Start Discord setup for a QA slot
  CLI->>Wizard: Launch with setup mode and slot
  Wizard->>Developer: Request token or app and destination details
  Developer->>Wizard: Enter setup details
  Wizard->>Registry: Validate and save slot configuration
Loading
Merge Risk: ⚪ Minimal · up to 6c4c6

No actionable issue remains in the reviewed Discord binding guidance and QA setup changes; the PR is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 8 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed The changes address the active coding objectives in [#1123] and [#1107]. Existing maintained-provider and unsupported-account behavior is reported as present from #1559. This PR adds Discord-specific …
Out of Scope Changes check Passed The changed README and guide text, changelog entries, evidence records, Discord UI translations, QA setup and loader code, focused tests, and isolated bundle-test configuration all support the [#1123]…
Title check Passed The title is concise, specific, and accurately summarizes the primary Discord binding qualification and QA setup changes.
Description check Passed The description is comprehensive and follows the required template. It includes the problem statement, issue links, merge risk, verification results and gaps, change outline, UI before/after evidence,…
Full details: Docstring Coverage

Explanation

Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 8 files. (7 skipped: 7 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DoodleBears

DoodleBears commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Current-head review aid

The local HTML explainer is refreshed for PR #1618, base e363a647876cf7cc41ee649e1de52c0604558ef5, head 6c4c68c8b6ab5917e98b4d415d268b96928096f3, generated 2026-10-14. It explains private Token-only setup, authenticated identity/current-window boundaries, the three corrected hints and the completed native Source → Admission → Outbox path. Desktop 1280 and narrow 390 inspection passed without horizontal overflow; renderer: zero STE warnings.

The HTML remains a local review aid, not a hosted reviewer artifact or runtime evidence. Reviewer-accessible native evidence and all 12 matched screenshot pairs are committed and embedded in the PR; all 26 images were verified to load. This supersedes the earlier missing-captures/CI/draft status.

Current-head official verify passed the entire pipeline with 4,713 tests (10 skipped). Native exact-marker reply and ignored-negative qualification passed; the receiver is stopped. The Client observer reported shell-ready, with no first failure or pre-stop failure. PR is ready, mergeable and configured to close #1123/#1107 on merge; no merge or publication was performed.

Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
The existing bundle contract failed on both base and head because tsdown discovered the multi-output root config and built the same overridden entry into one directory repeatedly. Disable config discovery for this explicit inline build.

Issue: #1123

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
Issue: #1123

Issue: #1107

Agent-Task: codex/local/01a1342d-5ce4-7872-9f9e-492a9caee393
@DoodleBears DoodleBears changed the title Add reusable Discord QA app setup and clarify binding scope Qualify Discord one-step binding and complete QA setup Oct 13, 2026
@DoodleBears
DoodleBears marked this pull request as ready for review October 13, 2026 21:26
@DoodleBears
DoodleBears merged commit 9c6c76e into main Oct 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant