Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

fix: scroll left sidebar to 'now' indicator on initial load

Summary

Fixes the left sidebar scroll position to default to showing "now" (the red line indicator) instead of requiring users to scroll down when they have calendar events synced.

The issue was that the initial scroll effect ran before the anchorNode (the DOM element for the "now" indicator) was available. The scroll function returns early when anchorNode is null, so the initial scroll never happened.

The fix waits for anchorNode to be available before attempting the initial scroll by adding it to the effect's dependency array and checking for its presence.

Review & Testing Checklist for Human

  • Test with calendar events synced - verify the sidebar scrolls to the red "now" line on app launch
  • Test without calendar events - verify the sidebar still behaves correctly
  • Test scrolling away from "now" and verify the "Go back to now" button still works

Notes

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 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 Jan 8, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 0ad9835
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/695efaca9c42ea00082944b0

@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit 0ad9835
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/695efaca4320bc00086db9b8

@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 0ad9835
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/695efacaa8be9f000879ab6c

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