feat: Scaffold basic Control window type with semi-transparent background#1936
feat: Scaffold basic Control window type with semi-transparent background#1936
Conversation
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe changes add a new "/app/control" route to the desktop application and extend the window management system to support a Control window type with transparency, resizable constraints, and initial 300×200 pixel sizing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
plugins/windows/src/window/v1.rs (1)
18-20: Control AppWindow wiring is consistent; consider DRYing repeated sizing patternThe new
AppWindow::Controlvariant is fully wired (serde rename,Display/FromStr,title, andbuild_windowwith/app/control), and the window builder config (transparent, resizable, 300×200 min/initial size) matches the intended behavior and existing patterns.If more windows follow this “build → sleep → set desired size” pattern, it could be worth extracting a small helper to reduce repetition, but that can be deferred.
Also applies to: 31-31, 47-47, 87-97, 178-191
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
apps/desktop/src/routeTree.gen.tsis excluded by!**/*.gen.tsplugins/windows/js/bindings.gen.tsis excluded by!**/*.gen.ts
📒 Files selected for processing (2)
apps/desktop/src/routes/app/control.tsx(1 hunks)plugins/windows/src/window/v1.rs(5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, usecn(import from@hypr/utils). It is similar toclsx. Always pass an array and split by logical grouping.
Usemotion/reactinstead offramer-motion.
Files:
apps/desktop/src/routes/app/control.tsx
🧬 Code graph analysis (2)
apps/desktop/src/routes/app/control.tsx (1)
packages/utils/src/cn.ts (1)
cn(20-22)
plugins/windows/src/window/v1.rs (1)
plugins/windows/src/events.rs (2)
window(14-14)window(32-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Redirect rules - hyprnote
- GitHub Check: Header rules - hyprnote
- GitHub Check: Pages changed - hyprnote
- GitHub Check: fmt
- GitHub Check: ci (macos, depot-macos-14)
🔇 Additional comments (1)
apps/desktop/src/routes/app/control.tsx (1)
5-40: Control route and layout look consistent and correctThe
/app/controlfile‑route wiring and the Component layout (semi‑transparent backdrop, header drag regions, and content area) are consistent with existing patterns and the window configuration, with no obvious correctness or UX issues.
feat: add Control window type with semi-transparent background
Summary
Adds a new
Controlwindow type to the windows plugin with transparency support. The window is configured as a small (300x200), resizable, semi-transparent window that allows users to see the background through it.Changes:
Controlvariant toAppWindowenum inplugins/windows/src/window/v1.rswithtransparent(true)enabledapps/desktop/src/routes/app/control.tsxwithbg-black/50 backdrop-blur-mdstylingUpdates since last revision
cnimport fromapps/desktop/src/components/main/sidebar/search/index.tsx(was blocking CI)Review & Testing Checklist for Human
tauri.conf.jsonfor transparency to work properlyRecommended test plan:
ONBOARDING=0 pnpm -F desktop tauri devwindowsCommands.windowShow({ type: "control" })data-tauri-drag-region)Notes
Link to Devin run: https://app.devin.ai/sessions/ce11dbaf17094bab8b6700046276dafc
Requested by: yujonglee (@yujonglee)