feat(core): EndArgs — omit dismiss response when void - #51
Conversation
Omit call/stack/handle dismiss response when undefined extends R (twin of PayloadArg). Tightens LayerHandle always-optional hole; docs, skills, and changeset aligned.
🦋 Changeset detectedLatest commit: 73c9248 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
Next review available in: 28 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThe PR adds conditional argument tuples for layer completion and dismissal APIs. Responses can be omitted when ChangesConditional dismissal arguments
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/content/reference/core-api.mdx`:
- Line 198: Update the teardown sentence in the core API reference to state that
a layer’s open() promise resolves with R when dismissed by the user, while
LayerStack.dismiss returns Promise<boolean> and dismissAll returns
Promise<void>. Keep the LayerCancelledError behavior for system teardown and the
existing error-handling reference unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4f2d96c8-2984-46ba-9922-92da24fac89b
📒 Files selected for processing (23)
.changeset/end-args-void-ergonomics.mdapps/docs/content/concepts/blockers.mdxapps/docs/content/concepts/overview.mdxapps/docs/content/guides/dismissal-blockers.mdxapps/docs/content/reference/core-api.mdxapps/docs/content/reference/migration.mdxapps/docs/recipes/progress/angular.tsapps/docs/recipes/progress/preact.tsxapps/docs/recipes/progress/react.tsxapps/docs/recipes/progress/solid.tsxapps/docs/recipes/progress/svelte-runes.svelteapps/docs/recipes/progress/svelte-store.svelteapps/docs/recipes/progress/vue-host.vuedocs/architecture.mdpackages/core/skills/layers/SKILL.mdpackages/core/src/callContext.test.tspackages/core/src/callContext.tspackages/core/src/createLayer.tspackages/core/src/index.test-d.tspackages/core/src/layerStack.test.tspackages/core/src/layerStack.tspackages/core/src/types.tspackages/react/skills/react-layers/SKILL.md
Summary
EndArgs/ResponseArgTuplesocall.end/dismiss, stackdismiss/dismissAll/cancelQueued, and handledismiss/cancelQueuedomit the response whenundefined extends R(twin ofPayloadArg).LayerHandle.dismiss/cancelQueued(no longer always-optional).Test plan
bun test packages/core/src(incl. voidcall.end()/dismissAll())bun run --filter ./packages/core typecheck(EndArgs matrix + handle tighten)bun run docs:validate -- --strictSummary by CodeRabbit
Improvements
undefined.Documentation
Tests