Skip to content

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Dec 3, 2025

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:

  • Fixed a minor formatting issue in crates/audio/src/mic.rs (removed trailing blank line) to pass CI lint checks
  • Added guards against invalid step values (e.g., when a user manually navigates to ?step=permissions on Linux, the flow now correctly finishes rather than looping back to "welcome")

Review & Testing Checklist for Human

  • Test on Linux: Verify that onboarding goes directly from "welcome" to completion, skipping the permissions step
  • Test on macOS: Verify that onboarding still shows the permissions step as expected
  • Edge case: On Linux, manually navigate to ?step=permissions and verify the flow finishes correctly (should not loop back to "welcome")
  • Review stepIndex logic: Verify the previous/next calculation 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

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-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 4fe8c94
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692ffed0e599b80008ac6053
😎 Deploy Preview https://deploy-preview-2092--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 4fe8c94
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692ffed0e599b80008ac604f
😎 Deploy Preview https://deploy-preview-2092--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

Onboarding 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

Cohort / File(s) Summary
Onboarding flow platform-specific logic
apps/desktop/src/routes/app/onboarding/index.tsx
Replace fixed STEPS with ALL_STEPS + computed STEPS via useIsLinux and useMemo; filter out the "permissions" step on Linux; update previous/next index calculations and validation to use the computed steps sequence.
Mic input whitespace cleanup
crates/audio/src/mic.rs
Removed a trailing blank line inside the tests module; no functional change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check useIsLinux correctness and whether its behavior is stable during render/hydration.
  • Verify useMemo dependencies include all relevant values so STEPS updates properly when platform changes.
  • Confirm previous/next index math and validation handle variable-length STEPS and edge cases (first/last step).
  • Quick lint/test run for apps/desktop and a trivial check of crates/audio/src/mic.rs.

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: skipping the permissions step during onboarding on Linux.
Description check ✅ Passed The description is directly related to the changeset, explaining the platform-specific onboarding flow changes and including a comprehensive testing checklist.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764751563-skip-permissions-linux

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0171a14 and 4fe8c94.

📒 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, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-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-storybook
  • GitHub Check: Header rules - hyprnote-storybook
  • GitHub Check: Pages changed - hyprnote-storybook
  • 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 (4)
apps/desktop/src/routes/app/onboarding/index.tsx (4)

3-3: LGTM! Imports correctly added.

The useMemo and useIsLinux imports are properly used for the platform-aware step computation.

Also applies to: 11-11


14-14: LGTM! Correct validation approach.

Validating against ALL_STEPS is correct—it allows any step in the URL (including edge cases like manually navigating to ?step=permissions on Linux) and handles them gracefully.

Also applies to: 17-17


56-63: LGTM! Core platform-specific logic is correct.

The useMemo optimization is appropriate, and the filtering correctly removes the "permissions" step on Linux while preserving the full flow on macOS.


65-72: LGTM! Navigation guards work correctly.

The index guards properly handle edge cases—when an invalid step (like "permissions" on Linux) is accessed, both previous and next become undefined, gracefully disabling navigation.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 skips permissions

Using useIsLinux plus the steps memo 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=permissions is manually injected into the URL), you could also gate the <Permissions> render in Component behind !isLinux, but that’s optional given the current requirement.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 867201e and bd705bf.

📒 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, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-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 good

Centralizing the step literals in ALL_STEPS and reusing it in z.enum(ALL_STEPS) keeps the search validation and navigation strictly in sync across platforms. No issues here.

Also applies to: 11-11, 14-19

devin-ai-integration bot and others added 2 commits December 3, 2025 08:50
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>
@yujonglee yujonglee merged commit ce25f90 into main Dec 3, 2025
16 of 17 checks passed
@yujonglee yujonglee deleted the devin/1764751563-skip-permissions-linux branch December 3, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants