Skip to content

fix(cli): ovis join takes discardTyped from where it lives now - #4578

Merged
devswha merged 2 commits into
mainfrom
fix/join-discard-typed
Nov 24, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/join-discard-typed

Conversation

@devswha

@devswha devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What

main fails bun run typecheck (so Fast checks is red on every PR that includes main):
scripts/plugin.ts destructures discardTyped from import("./plugin-link.ts") in joinCommand,
and #4544 moved that function to scripts/libc.ts while #4549 was open. The two merged side by side.

It is also a run-time bug, not only a type error: the destructured name shadowed the file's real
import with undefined, so ovis join did not discard typed-ahead input before asking whether
the invite's account is the person's own. The destructure now takes only linkSettings, and
discardTyped is the one imported from scripts/libc.ts at the top of the file.

Validation

  • bun run typecheck: passes (fails on main).
  • bun test scripts/plugin-join.test.ts scripts/plugin-cli.test.ts: pass.
  • Not run locally: the rest of bun run check fast, integration and browser suites (CI).

🤖 Generated with Claude Code

#4544 moved discardTyped from scripts/plugin-link.ts to scripts/libc.ts while #4549 (ovis join)
was open; the two merged side by side, so main's typecheck fails on the destructure in
joinCommand, and at run time the name shadowed the real import with undefined: ovis join did not
discard typed-ahead input before its account question.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Refactor
    • Simplified how the join command passes its existing discard-typed behavior.

joinCommand no longer destructures discardTyped from the plugin-link.ts import. The discard option passed to joinPc is unchanged.

Changes: Join command

Layer / File(s) Summary
Update join command import
scripts/plugin.ts
joinCommand no longer imports discardTyped from plugin-link.ts. The existing discard option passed to joinPc remains unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#4544: Moved discardTyped from scripts/plugin-link.ts to scripts/libc.ts, leaving the stale import in joinCommand.
  • devswha/ovis#4549: Added the ovis join command, which contains the import updated here.

Suggested reviewers: fivetaku

Merge Risk: Minimal · previous review de931

This fixes ovis join so typed-ahead input is discarded before the account question is asked. It is a small import cleanup that restores the intended behavior and also fixes the typecheck failure. No remaining merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the ovis join command now takes discardTyped from its new location. The raw summary, objectives, and description all describe this same single-line import fix in scrip…
Description check Passed The description explains the problem (main fails typecheck because joinCommand destructured discardTyped from plugin-link.ts after it moved to libc.ts), the run-time impact (typed-ahead input was not …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the ovis join command now takes discardTyped from its new location. The raw summary, objectives, and description all describe this same single-line import fix in scripts/plugin.ts. The title uses the conventional fix(cli) prefix and is specific enough for history scanning.

Full details: Description check

Explanation

The description explains the problem (main fails typecheck because joinCommand destructured discardTyped from plugin-link.ts after it moved to libc.ts), the run-time impact (typed-ahead input was not discarded before the account-ownership prompt), and the fix. It includes a Validation section listing the typecheck and targeted test results and the checks not run locally. It does not follow the template's changelog reminder from CONTRIBUTING.md, and it gives no issue link for the fix, but the template's Change and Validation sections are both substantively filled in. The fix is a bug fix, so the feature-issue link requirement does not apply.

Finishing Touches

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between da6704a and de931dd.

Files selected for processing: 1

  • scripts/plugin.ts

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

@devswha
devswha merged commit a2f9d4e into main Nov 24, 2026
16 checks passed
@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head e3e3583df. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main red, and this pull request fixes it (below), no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main is red (0b499bd), and this PR's head passes the failing checks: allowed as a main fix (Fast checks, herdr-core live contract).

Fixes main: #4544 and #4549 merged side by side and main's typecheck fails on one destructure (also a run-time bug in ovis join: typed-ahead input was not discarded before the account question). One line; typecheck and the join tests pass.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant