Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

Overview

  • Added scroll margin for ID elements to improve scrolling behavior
  • Simplified section anchor handling in the UI

Details

  • Implemented scroll margin CSS to enhance user experience when navigating to anchored sections
  • Refactored anchor handling to improve code readability and maintainability

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit b79371e
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692e8e27d4d1a0000844a01c
😎 Deploy Preview https://deploy-preview-2061--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 2, 2025

📝 Walkthrough

Walkthrough

Multiple route component files are refactored to simplify DOM structure by removing absolute-positioned spacer divs and relative wrapper containers, moving anchor IDs directly onto section elements, and introducing a global scroll-margin-top CSS rule to maintain scroll offset behavior.

Changes

Cohort / File(s) Summary
Section wrapper simplification
apps/web/src/routes/_view/index.tsx, apps/web/src/routes/_view/product/ai-assistant.tsx, apps/web/src/routes/_view/product/ai-notetaking.tsx, apps/web/src/routes/_view/product/mini-apps.tsx
Removed relative-positioned wrapper containers and absolute-positioned spacer divs; moved anchor IDs directly onto section elements (e.g., id="hero", id="before-meeting", id="editor", id="search", id="floating-panel"). DOM structure simplified without changing content or logic.
Global scroll offset styling
apps/web/src/styles.css
Added @layer base rule applying scroll-margin-top: 69px to all ID-attributed elements ([id]), replacing the previous offset behavior achieved through absolute-positioned spacer divs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Multiple files affected with identical refactoring pattern (homogeneous changes reduce cognitive load)
  • Scroll offset behavior migration from DOM structure to CSS requires verification
  • Areas requiring extra attention:
    • Confirm scroll-margin-top value (69px) correctly replaces previous offset behavior across all anchored sections
    • Test anchor navigation to all modified sections (#hero, #before-meeting, #editor, #search, #floating-panel, etc.) functions as intended
    • Visual regression testing to ensure no layout shifts or unintended spacing changes

Possibly related PRs

Suggested reviewers

  • yujonglee

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 PR title accurately summarizes the main changes: adding scroll margins for anchor navigation and simplifying section structure handling across multiple files.
Description check ✅ Passed The PR description directly relates to the changeset by explaining the addition of scroll margin CSS and refactoring of anchor handling to improve navigation and code readability.
✨ 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 style/scroll-margin-id-elements

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

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit b79371e
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692e8e27a3346b0008fcf873
😎 Deploy Preview https://deploy-preview-2061--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.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/src/routes/_view/product/ai-notetaking.tsx (1)

2384-2395: Use floatingPanelTabs.length instead of tabs.length in border condition

In FloatingPanelDesktop, the list item border condition uses index < tabs.length - 1, but the map is over floatingPanelTabs. This currently works only because both arrays happen to have the same length, but it's misleading and fragile if either changes.

-                index < tabs.length - 1 && "border-b border-neutral-100",
+                index < floatingPanelTabs.length - 1 &&
+                  "border-b border-neutral-100",
🧹 Nitpick comments (1)
apps/web/src/styles.css (1)

13-17: Global scroll offset for all anchors looks good; consider scope if future ids proliferate

Applying scroll-margin-top: 69px to [id] in the base layer is a clean way to fix header overlap for in-page anchors and aligns with the section refactors. If you later add many non-anchor ids (e.g., intra-component targets), you may want to narrow this selector to something like section[id] to avoid surprising scroll offsets.

📜 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 2d7101e and b79371e.

📒 Files selected for processing (5)
  • apps/web/src/routes/_view/index.tsx (1 hunks)
  • apps/web/src/routes/_view/product/ai-assistant.tsx (3 hunks)
  • apps/web/src/routes/_view/product/ai-notetaking.tsx (6 hunks)
  • apps/web/src/routes/_view/product/mini-apps.tsx (5 hunks)
  • apps/web/src/styles.css (1 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/web/src/routes/_view/index.tsx
  • apps/web/src/routes/_view/product/ai-notetaking.tsx
  • apps/web/src/routes/_view/product/ai-assistant.tsx
  • apps/web/src/routes/_view/product/mini-apps.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:32:19.706Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:19.706Z
Learning: Applies to **/*.{ts,tsx} : Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props. Just inline them.

Applied to files:

  • apps/web/src/routes/_view/product/mini-apps.tsx
⏰ 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: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: ci
🔇 Additional comments (4)
apps/web/src/routes/_view/index.tsx (1)

292-295: Hero section id refactor aligns with new anchor pattern

Moving the hero id onto the <section> itself simplifies the DOM and works nicely with the global scroll margin offset; no issues spotted.

apps/web/src/routes/_view/product/ai-assistant.tsx (1)

78-186: Section ids for meeting phases are consistent and ready for anchor navigation

Attaching id="before-meeting", id="during-meeting", and id="after-meeting" directly to the section wrappers is a good simplification and matches the new scroll-margin behavior. Content and borders stay intact, so this should be a pure structural win.

Also applies to: 192-292, 298-400

apps/web/src/routes/_view/product/mini-apps.tsx (1)

78-248: Mini-app section ids line up with cross-page links

Defining id="contacts", id="calendar", id="daily-notes", id="noteshelf", and id="advanced-search" directly on the section elements keeps the layout unchanged while making anchor navigation straightforward. These ids are descriptive and consistent with the existing deep links into the mini-apps page.

Also applies to: 254-408, 414-506, 512-600, 630-675

apps/web/src/routes/_view/product/ai-notetaking.tsx (1)

188-287: Ids on AI‑notetaking feature sections are coherent and match incoming links

Adding id="editor", id="transcription", id="summaries", id="search", id="sharing", and id="floating-panel" directly to the main sections keeps structure simple and makes anchors like /product/ai-notetaking#editor and #search work cleanly with the new global scroll offset. No structural regressions spotted.

Also applies to: 666-768, 835-1085, 1097-1103, 1940-2125, 2164-2167

@ComputelessComputer ComputelessComputer merged commit a83356a into main Dec 2, 2025
14 checks passed
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