-
Notifications
You must be signed in to change notification settings - Fork 434
Skip permissions step in onboarding on Linux #2092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
On Linux, the macOS-specific permissions (Microphone, System Audio, Accessibility) don't apply the same way, so the permissions step is skipped during onboarding. 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. |
📝 WalkthroughWalkthroughOnboarding step computation was changed from a fixed array to a computed list that omits the "permissions" step on Linux using a platform hook and useMemo. A trailing blank line was removed from a microphone test file. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)apps/desktop/src/routes/app/onboarding/index.tsx (1)
⏰ 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). (8)
🔇 Additional comments (4)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/desktop/src/routes/app/onboarding/index.tsx (1)
56-64: Linux-specific steps computation correctly skipspermissionsUsing
useIsLinuxplus thestepsmemo to drop"permissions"on Linux achieves the goal of treating"welcome"as the last step there, while preserving the full flow on other platforms. The behavior is consistent with the existing navigation code.If you ever want to fully prevent the permissions UI from appearing on Linux (e.g., when
step=permissionsis manually injected into the URL), you could also gate the<Permissions>render inComponentbehind!isLinux, but that’s optional given the current requirement.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/desktop/src/routes/app/onboarding/index.tsx(2 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/onboarding/index.tsx
🧬 Code graph analysis (1)
apps/desktop/src/routes/app/onboarding/index.tsx (1)
apps/desktop/src/hooks/usePlatform.ts (1)
useIsLinux(9-11)
⏰ 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). (8)
- GitHub Check: Redirect rules - hyprnote
- GitHub Check: Header rules - hyprnote
- GitHub Check: Pages changed - hyprnote
- GitHub Check: fmt
- GitHub Check: desktop_ci (macos, depot-macos-14)
- GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
- GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
- GitHub Check: Devin
🔇 Additional comments (1)
apps/desktop/src/routes/app/onboarding/index.tsx (1)
3-4: ALL_STEPS and validation wiring look goodCentralizing the step literals in
ALL_STEPSand reusing it inz.enum(ALL_STEPS)keeps the search validation and navigation strictly in sync across platforms. No issues here.Also applies to: 11-11, 14-19
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
When step isn't present in steps (e.g., step='permissions' on Linux), steps.indexOf(step) returns -1, so next would become steps[0] instead of undefined. This fix guards on the index to handle this edge case. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Summary
On Linux, the macOS-specific permissions (Microphone, System Audio, Accessibility) don't apply the same way, so this PR skips the permissions step during onboarding when running on Linux.
The change uses the existing
useIsLinux()hook to detect the platform and filters out the "permissions" step from the onboarding flow on Linux. On macOS, the onboarding flow remains unchanged.Additional changes:
crates/audio/src/mic.rs(removed trailing blank line) to pass CI lint checks?step=permissionson Linux, the flow now correctly finishes rather than looping back to "welcome")Review & Testing Checklist for Human
?step=permissionsand verify the flow finishes correctly (should not loop back to "welcome")previous/nextcalculation handles boundary conditions correctly (first step, last step, invalid step)Recommended test plan: Run the desktop app on Linux with
ONBOARDING=1(or fresh install) and verify the onboarding flow completes after the welcome step without showing permissions.Notes