Skip to content

fix(notes): keep the note stylesheet in the production bundle - #276

Merged
EtienneLescot merged 1 commit into
release/v1.9.0from
fix/notes-stylesheet-on-release-1.9.0
Aug 5, 2026
Merged

fix(notes): keep the note stylesheet in the production bundle#276
EtienneLescot merged 1 commit into
release/v1.9.0from
fix/notes-stylesheet-on-release-1.9.0

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Cherry-pick of adaba8e (#270, merged into main) onto the frozen 1.9.0 branch. Clean pick, no conflict.

The Notes window is unusable in 1.9.0-rc.2 as shipped: paste a long text and the note fills the window, the wheel does nothing, and every toolbar button leaves the screen for good.

NotesWindow.tsx imported its stylesheet for the side effect only, with no binding — Rollup tree-shakes a binding-less CSS-module import out of the production bundle, so the shipped app carried zero .tiptap rules. Dev never showed it because Vite injects module CSS at runtime. Without height: 100% + overflow-y: auto the note body stops being a scroll container, and ProseMirror's scroll-into-view then scrolls the overflow: hidden shell instead.

Renamed to a plain .css (every selector was already :global) so the rules always ship. Also restores the mirror transform, list markers, code blocks and heading sizes in the packaged app.

Related issue

Refs #270

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Windows
  • macOS
  • Linux

Screenshots / video

Measured on a 400x540 window (the Notes window default), ~5.8k characters pasted:

before after
editor height 6360 px (viewport 540) 412 px
editor scrollable no yes
toolbar position y = -5913, off-screen y = 19, visible
buttons hit-testable 0 13 / 13

Testing

Verified against the production bundle on main before the pick: vite build then vite preview at ?showNotes=true. 0 .tiptap rules emitted before the fix, 30 after. Unit suites and typecheck were green on #270; CI covers this branch via the release/** trigger.

Needs prerelease.yml rerun with rc_number: 3 after merge — otherwise the Discord testers keep validating an RC without the fix.

`NotesWindow.module.css` was imported for its side effect only, with no
binding. Rollup tree-shakes a binding-less CSS-module import out of the
production bundle, so the shipped app carried zero `.tiptap` rules — dev
looked fine because Vite injects module CSS at runtime there.

Without `height: 100%` + `overflow-y: auto` the note body stops being a
scroll container and grows to the height of its content. Paste a long
note and ProseMirror scrolls the caret into view, which now scrolls the
`overflow: hidden` shell instead: the toolbar leaves the viewport and
the wheel cannot bring it back. Measured on a 400x540 window with ~5.8k
characters pasted — editor 6360px tall, `scrollTop` pinned, toolbar at
y=-5913, zero buttons hit-testable.

Every selector in the file was already `:global`, so the CSS module
bought nothing: rename it to plain `.css` and drop the wrappers. A plain
CSS import is always emitted. This also restores the mirror transform,
list markers, code blocks and heading sizes in production.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 83f02dde-e021-4853-890c-19b553197038

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@EtienneLescot
EtienneLescot merged commit 6e18e8b into release/v1.9.0 Aug 5, 2026
15 checks passed
@EtienneLescot
EtienneLescot deleted the fix/notes-stylesheet-on-release-1.9.0 branch August 5, 2026 08:24
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.

1 participant