refactor: pass the message directly to resolveJumpAnchor - #7675
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
🧰 Additional context used📓 Path-based instructions (3)Format JavaScript and TypeScript code with Oxfmt using the repository configuration: tabs, single quotes, 130-character width, no trailing commas, omitted arrow-function parentheses where possible, and same-line brackets.📄 CodeRabbit inference engine (CLAUDE.md) Files:
Use descriptive names for functions, variables, and classes that clearly convey their purpose Write comments that explain the 'why' behind code decisions, not the 'what' Keep functions small and focused on a single responsibility Use const...📄 CodeRabbit inference engine (AGENTS.md) Files:
Use TypeScript for type safety; add explicit type annotations to function parameters and return types Prefer interfaces over type aliases for defining object shapes in TypeScript Use enums for sets of related constants rather than magic str...📄 CodeRabbit inference engine (AGENTS.md) Files:
🔇 Additional comments (2)
Walkthrough
ChangesRoom navigation jump data
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Refactor Suggested labels: Merge Risk: ⚪ Minimal · up to The change preserves the resolver contract and is covered by passing tests. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Warning Errors were encountered while retrieving linked issues. Errors (1)
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 |
Proposed changes
Pass the message-info result directly to
resolveJumpAnchorinstead of rebuilding a four-field copy of it at the call site. The result already carries everyIJumpTargetfield with identical types, so the copy translated nothing.IJumpTargetstays as the resolver's narrow contract and the resolver itself is untouched.Removing the copy also closes a drift hazard: a field added to
IJumpTargetlater is now checked by the type system at the call site instead of silently arriving asundefined.Issue(s)
Follow-up to #7482; targets its
native-34-roomview-hooksbranch.How to test or reproduce
pnpm format-lintpassed, including TypeScript compilation.TZ=UTC pnpm test --runInBand --watchman=falsepassed: 315 suites, 2,902 tests, 426 snapshots.Screenshots
Not applicable; no visual changes.
Types of changes
Checklist
Further comments
The two composed navigation tests now bind the message fixture to a constant and assert the resolver call exactly against it. The out-of-window case previously used a partial matcher, so the assertion is stricter than before. No tests were added or removed. Standards and specification reviews reported no findings.
Summary by CodeRabbit
Bug Fixes
Tests