You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(browser): move the grab hook type to its owner - #36087
Keep the combined annotation changes within the repository's file-size limit by moving the grab hook's return type beside its existing option and toast types.
What Changed
The return type moves unchanged to browser-page-types.ts. The hook imports it instead of declaring it inline. No runtime code changes.
Why
The annotation-limit and image-paste changes each passed separately. Together they left the hook at 304 counted lines against a 300-line cap. Moving its type to the existing owner restores the limit without changing behavior.
N/A. Type declarations move without changing rendered output or behavior.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
The existing grab-annotation suite passes, 6 tests. Focused oxlint, formatting, and git diff --check pass on macOS. No new tests are needed for moving a type unchanged. CI covers typechecking and the remaining checks.
AI Disclosure
Review
Compared the moved type with the original declaration. Properties and function signatures are unchanged; React type imports remain in the existing types module.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
The change adds the BrowserPageGrabAnnotations type to describe the annotation hook’s return value. The hook now declares this shared type instead of an inline object shape. The type module also imports and re-exports GrabIntent.
Priority: Low
Merge Risk: Minimal · previous review 661b2
The change appears limited to a type extraction; no merge-blocking issue was identified.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title names the change: moving the grab hook's type to the module that owns it. The raw summary confirms the return type of useBrowserPageGrabAnnotations now uses BrowserPageGrabAnnotations, defin…
Description check
The description follows the template well. It has ELI5, What Changed, Why, Linked Issue (follow-up to #35979 and #36004), Visual Proof marked N/A with a reason, Testing with results, Review, Agent ski…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: moving the grab hook's type to the module that owns it. The raw summary confirms the return type of useBrowserPageGrabAnnotations now uses BrowserPageGrabAnnotations, defined in browser-page-types.ts. The title is specific and matches the changeset. The 'refactor(browser)' prefix is a conventional-commit style, which is acceptable.
Full details: Description check
Explanation
The description follows the template well. It has ELI5, What Changed, Why, Linked Issue (follow-up to #35979 and #36004), Visual Proof marked N/A with a reason, Testing with results, Review, Agent skill boundary, Notes, and Checklist. It explains the before and after and the mechanism. Gaps: the Linked Issue section uses 'Follow-up to' instead of the 'Fixes #' form, which is acceptable for a follow-up change. The AI Disclosure section is empty, but the template says to skip it for StablyAI team members, so this is not a defect if the author is internal. The manual testing box is unchecked while the automated tests box is checked, and the text says the tests were run locally, so the unchecked box is inconsistent.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Keep the combined annotation changes within the repository's file-size limit by moving the grab hook's return type beside its existing option and toast types.
What Changed
The return type moves unchanged to
browser-page-types.ts. The hook imports it instead of declaring it inline. No runtime code changes.Why
The annotation-limit and image-paste changes each passed separately. Together they left the hook at 304 counted lines against a 300-line cap. Moving its type to the existing owner restores the limit without changing behavior.
Linked Issue
Follow-up to #35979 and #36004.
Visual Proof
N/A. Type declarations move without changing rendered output or behavior.
Testing
The existing grab-annotation suite passes, 6 tests. Focused oxlint, formatting, and
git diff --checkpass on macOS. No new tests are needed for moving a type unchanged. CI covers typechecking and the remaining checks.AI Disclosure
Review
Compared the moved type with the original declaration. Properties and function signatures are unchanged; React type imports remain in the existing types module.
Agent skill upstream boundary
Notes
Type-only change. Platform behavior, SSH, mobile, wire compatibility, and performance remain unchanged.
Checklist
N/Awith reason