refactor: route runtime toast helper directly#260
refactor: route runtime toast helper directly#260ndycode wants to merge 1 commit intorefactor/pr4-runtime-toast-helperfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
Summary
index.tsWhat Changed
showToast()wrappershowRuntimeToast(client, ...)directly while preserving variant/title/duration behaviorValidation
npm run lintnpm run typechecknpm run buildRisk and Rollback
30d509bto restore the inline runtime toast wrapper inindex.tsAdditional Notes
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
removes the inline
showToastclosure fromOpenAIOAuthPluginand routes all 16 toast call sites directly through the already-extractedshowRuntimeToast(client, ...)helper inlib/runtime/toast.ts. this is a pure mechanical cleanup — no behavioral change, no new logic.index.test.tscoverage (client.tui.showToastmock at line 559;showToast error handlingsuite at line 3305) continues to validate the path via the helperlib/runtime/toast.tsstill has no dedicated unit test file despite now being the sole toast path for the entire plugin — follow-uptoast.test.tssuite recommendedoptions?.duration && ...) silently dropsduration: 0; no current call site is affected but worth a!= nullfixConfidence Score: 5/5
Important Files Changed
showToastclosure wrapper; all 16 call sites mechanically updated to callshowRuntimeToast(client, ...)directly — behavior identical, refactor is correctoptions?.duration && ...dropsduration: 0) and no dedicated vitest unit coverage — now the sole path for all 16 toast call sitesSequence Diagram
sequenceDiagram participant P as OpenAIOAuthPlugin (index.ts) participant H as showRuntimeToast (lib/runtime/toast.ts) participant T as client.tui.showToast note over P: before this PR P->>P: showToast(msg, variant, opts) P->>H: showRuntimeToast(client, msg, variant, opts) H->>T: showToast({ body: { message, variant, ...opts } }) note over P: after this PR P->>H: showRuntimeToast(client, msg, variant, opts) H->>T: showToast({ body: { message, variant, ...opts } })Prompt To Fix All With AI
Last reviewed commit: "refactor: route runt..."