Forcing inputStyle to contenteditable (previous commit) didn't fix it on
iPhone, confirming this is CodeMirror 5's own long-standing weakness with
CJK IME composition on iOS WebKit, not just the iPad desktop-UA detection
issue. There's no reliable fix short of dropping CodeMirror for the journal
content field, so EasyMDE is removed entirely and the textarea goes back to
a native, uncontrolled <textarea> — nothing intercepts/re-renders it during
composition, so iOS's IME just works.
The markdown toolbar buttons (bold/italic/heading/quote/lists/code/link)
now manipulate the textarea's selection directly via a small JournalEditor
JS API instead of calling EasyMDE/CodeMirror commands, and image paste
tracks its upload placeholder by a unique text marker instead of a
CodeMirror bookmark. Also drops the vendored easymde.min.js/css (no longer
referenced) and bumps the service worker CACHE_NAME so stale cached copies
of the old vendor files get evicted.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- calendar-cell-journal: bump min-height 44px -> 76px, scale up date/dot/title font sizes
- journal calendar titles were centered; left-align them
- rework JournalCalendarDay: replace separate category_colors/titles lists
(mismatched lengths, no way to pair a dot with its title) with a single
entries list of (color, title) pairs so the dot and its title render on
the same non-wrapping row per entry
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Replace the plain textarea with EasyMDE (vendored locally, no CDN) for
markdown authoring: syntax highlighting, smart list continuation, and a
custom text-based toolbar (built-in EasyMDE toolbar icons require Font
Awesome from a CDN, which this app doesn't use). unorderedListStyle is set
to "-" to match the app's own template convention.
- Add a preview/edit toggle button that swaps the editor for the exact same
server-rendered markdown (via /journal/preview) shown after saving, instead
of always showing both.
- Fix create/edit entry routes to verify the submitted category_id actually
belongs to the current user before inserting -- every other write path in
this app already checked ownership; this one didn't (found while manually
testing the new editor with a typo'd category id that happened to belong to
someone else's category, which surfaced as an IntegrityError 500 instead of
a clean 404-equivalent).
- Fix the default "일상" category template: bare "-" bullet lines don't parse
as list items in the markdown renderer (they need a trailing space), and
the content_template validator was silently stripping that trailing space
off on every save. Backfill migration updates any category still holding
the old, broken template text.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Mood switches from a single enum column to a many-to-many
JournalEntryMood table so an entry can carry several feelings at
once; the vocabulary is trimmed to 9 named emotions (dropped the
overlapping satisfaction scale) with unified noun-style labels.
- Categories can define a content_template that pre-fills the "new
entry" textarea when selected (only if the user hasn't started
typing), seeded with a Story/Feelings/Decisions/Insights/Actions
reflection template on the default "일상" category.
- Fixes a real attribute-injection bug found while building the
template feature: Jinja's built-in |tojson filter doesn't escape
double quotes, which breaks a double-quoted x-data="..." attribute
when the JSON payload contains one; added |forceescape and a
regression test.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds an 8th development stage that lets users keep a free-form journal alongside
habit tracking, reusing the existing Google OAuth/DB/PWA infrastructure instead
of a separate project. Users organize entries into custom categories, filter by
a month calendar with day-detail drill-down, attach photos/videos (served via an
authenticated route, never /static), tag entries, and pick multiple emotions per
entry from a curated 9-option set. Includes a global journal prompt bank for
lightweight guided journaling.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>