Skip to content

Make memo usable on mobile - #1

Merged
chasehuh merged 6 commits into
mainfrom
task/mobile-compat
Jul 14, 2026
Merged

Make memo usable on mobile#1
chasehuh merged 6 commits into
mainfrom
task/mobile-compat

Conversation

@chasehuh

@chasehuh chasehuh commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the desktop editor layout (including line gutter) and add soft wrap by default, toggleable in Settings
  • On phone widths (≤480px), show a minimal bottom-left icon to open the notes panel; hide it on normal browser windows
  • Add viewport / safe-area basics so phones can use notes without relying on ⌘B/⌘N

Test plan

  • Phone-width viewport: bottom-left icon opens notes; selecting a note closes the panel
  • Wider browser window: no floating notes icon; ⌘B still works
  • Settings → Editor: Wrap / No wrap persists
  • Line numbers remain visible with wrap enabled
  • Vercel preview checks green

chasehuh and others added 2 commits July 14, 2026 15:20
Add a notes drawer with touch targets, safe-area layout, and 16px editor text so phones can browse and write without desktop shortcuts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mark the off-canvas panel inert when closed so mobile focus cannot land on hidden controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Jul 14, 2026 6:27am

Let users toggle soft wrap in Settings while keeping line breaks, persisted in localStorage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the overlay sidebar with a bottom-left Notes control and restore the gutter so mobile matches desktop layout aside from wrap.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the Notes label so the floating control stays minimal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Only treat viewports under 480px as mobile so normal browser windows keep the desktop chrome.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chasehuh
chasehuh merged commit f1a701d into main Jul 14, 2026
2 checks passed
@chasehuh
chasehuh deleted the task/mobile-compat branch July 14, 2026 06:28
chasehuh added a commit that referenced this pull request Aug 5, 2026
Closes the authoring gap from #77: `/n/{id}` deep links have been clickable
since #64, but there was no way to PRODUCE one without leaving the note,
copying a URL out of the address bar, and hand-writing the Markdown.

Typing `[[` opens a note picker; picking one inserts `[Title](/n/{id})`. A
query that matches nothing offers `Create "…"`, which creates a real note row
and inserts its link WITHOUT navigating away from the parent — that
non-navigating create is the whole point, so `createNoteRow` is split out of
`createNote` (⌘N keeps navigating). A `/` palette at line start offers the
same two moves.

Wire format is plain Markdown. `[[` is a trigger, never stored. Storing raw
wikilinks would need a title->id index over derived, mutable, non-unique
titles, and would break `/p/…` rendering. Since the link is ordinary text, it
rides the CRDT through a normal `view.dispatch` — no CRDT-aware link code, no
migration, no second syntax to reconcile.

The create flow deletes the trigger synchronously and inserts at the caret
read AFTER the round trip: positions captured before an await go stale, and a
user who keeps typing should get the link at their caret, not a corrupt splice.

Tags are inline `#tag`, parsed in `lib/tags.ts` — must follow whitespace and
hold a non-digit, so `# Heading` stays a heading and `#1` stays an issue ref.
Fenced blocks, inline code, and link destinations are skipped. Derived on the
client: `GET /api/notes` already ships every body, so a `note_tags` table
would mean a migration plus a projection write on both the legacy PUT and CRDT
paths for no user-visible gain at this size. Sidebar chips and editor clicks
drive one filter; `#` completes from tags already in use.

The `/` palette treats its query as an ARGUMENT, not a filter — `/dep` still
offers "Link to note". Filtering there hid the command being reached for.

`@codemirror/autocomplete` was already in the tree via `@codemirror/lang-markdown`;
this only promotes it to a direct dependency. No version moved.
chasehuh added a commit that referenced this pull request Aug 5, 2026
Closes the authoring gap from #77: `/n/{id}` deep links have been clickable
since #64, but there was no way to PRODUCE one without leaving the note,
copying a URL out of the address bar, and hand-writing the Markdown.

Typing `[[` opens a note picker; picking one inserts `[Title](/n/{id})`. A
query that matches nothing offers `Create "…"`, which creates a real note row
and inserts its link WITHOUT navigating away from the parent — that
non-navigating create is the whole point, so `createNoteRow` is split out of
`createNote` (⌘N keeps navigating). A `/` palette at line start offers the
same two moves.

Wire format is plain Markdown. `[[` is a trigger, never stored. Storing raw
wikilinks would need a title->id index over derived, mutable, non-unique
titles, and would break `/p/…` rendering. Since the link is ordinary text, it
rides the CRDT through a normal `view.dispatch` — no CRDT-aware link code, no
migration, no second syntax to reconcile.

The create flow deletes the trigger synchronously and inserts at the caret
read AFTER the round trip: positions captured before an await go stale, and a
user who keeps typing should get the link at their caret, not a corrupt splice.

Tags are inline `#tag`, parsed in `lib/tags.ts` — must follow whitespace and
hold a non-digit, so `# Heading` stays a heading and `#1` stays an issue ref.
Fenced blocks, inline code, and link destinations are skipped. Derived on the
client: `GET /api/notes` already ships every body, so a `note_tags` table
would mean a migration plus a projection write on both the legacy PUT and CRDT
paths for no user-visible gain at this size. Sidebar chips and editor clicks
drive one filter; `#` completes from tags already in use.

The `/` palette treats its query as an ARGUMENT, not a filter — `/dep` still
offers "Link to note". Filtering there hid the command being reached for.

`@codemirror/autocomplete` was already in the tree via `@codemirror/lang-markdown`;
this only promotes it to a direct dependency. No version moved.
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