Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughA new test suite validates viewport bounds clamping in the ChangesViewport Bounds Clamping & Responsive Resizing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ui/src/features/agent/hooks/useResizableDraggable.ts (1)
1-1:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd the required GPL header before the imports.
This changed TypeScript file still starts directly with imports, so it misses the repository’s required license banner. Please run
make addlicenseon the touched file before merge.As per coding guidelines,
**/*.{go,ts,tsx,js}: Apply GPL v3 license headers on source files, managed viamake addlicense.🤖 Prompt for 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. In `@ui/src/features/agent/hooks/useResizableDraggable.ts` at line 1, This file is missing the required GPL v3 license header; run the repository tool to add it by executing `make addlicense` for the modified file (ui/src/features/agent/hooks/useResizableDraggable.ts) before merging so the GPL banner is inserted above the imports; ensure the header is applied to the module that contains the useResizableDraggable hook and its imports so the file complies with the repository's licensing policy.
🤖 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 `@ui/src/features/agent/hooks/__tests__/useResizableDraggable.test.ts`:
- Around line 1-2: Add the GPL v3 license banner to this test file by running
the repository license tool: run make addlicense to apply the GPL header to the
TypeScript test (ensure the header appears at the very top of
useResizableDraggable.test.ts before the import lines like "import { act,
renderHook }" and "import { afterEach, describe, expect, it }"), then commit the
updated file so it matches the repository rule for **/*.{go,ts,tsx,js}.
---
Outside diff comments:
In `@ui/src/features/agent/hooks/useResizableDraggable.ts`:
- Line 1: This file is missing the required GPL v3 license header; run the
repository tool to add it by executing `make addlicense` for the modified file
(ui/src/features/agent/hooks/useResizableDraggable.ts) before merging so the GPL
banner is inserted above the imports; ensure the header is applied to the module
that contains the useResizableDraggable hook and its imports so the file
complies with the repository's licensing policy.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e821d2b3-ccb1-4846-a7e6-211253ef83d6
📒 Files selected for processing (2)
ui/src/features/agent/hooks/__tests__/useResizableDraggable.test.tsui/src/features/agent/hooks/useResizableDraggable.ts
b460a12 to
f709882
Compare
Summary
Root cause
Saved
rightandbottomoffsets were clamped against the minimum modal size instead of the clamped actual modal size. A browser zoom or viewport shrink could therefore leave the fixed-position modal with a negative top or left offset, and already-open modals were not re-clamped on resize.Testing
pnpm vitest run src/features/agent/hooks/__tests__/useResizableDraggable.test.ts src/features/agent/components/__tests__/AgentChatModal.test.tsxpnpm typecheckpnpm exec eslint --ext .ts,.tsx src/features/agent/hooks/useResizableDraggable.ts src/features/agent/hooks/__tests__/useResizableDraggable.test.tspnpm testpnpm build1100x760, then900x520, with mocked API responsesSummary by CodeRabbit
Release Notes
Bug Fixes
Tests