Skip to content

[codex] Add practice notebook journal flow - #80

Merged
Talljack merged 1 commit into
mainfrom
codex/practice-notebook-journal
Jun 18, 2026
Merged

Talljack merged 1 commit into
mainfrom
codex/practice-notebook-journal

Conversation

@Talljack

Copy link
Copy Markdown
Owner

What changed

  • Adds the /journal Practice Notebook flow with list/detail pages, manual creation, import dialog, editable entry rows, highlighting, and whole-notebook practice materialization.
  • Broadens journal entries beyond fixed dialogue roles: speaker is now optional free text, so entries can be unlabeled phrases, A/B dialogue lines, Speak exports, or any custom label.
  • Adds AI structure/OCR endpoints and shared normalization prompts for mixed English-learning material instead of teacher/me-only conversations.
  • Adds Speak integration via SaveToJournalButton, including iOS native-host visibility and a guard that requires a real user message before saving.
  • Wires journals into Dexie and Supabase sync with tombstone deletes, plus a migration for the remote table/RLS.

Why

The original notebook design assumed every saved item was a strict dialogue turn. Real learning material can be single phrases, unlabeled sentences, A/B scripts, lesson notes, or conversations exported from Speak. This PR makes the notebook model match those actual use cases while keeping Speak -> Save compatible.

Validation

  • pnpm typecheck
  • pnpm test src/lib/journal-structure.test.ts src/components/journal/save-to-journal-button.test.tsx src/stores/__tests__/journal-store.test.ts
  • pnpm exec biome check src/lib/journal-structure.test.ts src/lib/journal-structure.ts src/components/journal/import-dialog.tsx src/components/journal/journal-detail.tsx src/components/journal/journal-list.tsx src/components/journal/turn-row.tsx src/stores/journal-store.ts src/types/journal.ts
  • pnpm build

Browser QA

Verified with agent-browser against the local app:

  • Created Useful Phrase Set from /journal via the real New dialog.
  • Added real entries with no speaker, A, B, and Phrase labels.
  • Confirmed /journal list shows Useful Phrase Set 4 entries and search matches the unlabeled line.
  • Opened /speak, entered Ordering Coffee, sent a user message, confirmed Save becomes enabled, saved, and confirmed /journal shows Ordering Coffee 3 entries #speak.
  • Tested Import flow with a browser network mock for /api/journal/structure: Analyze -> editable free-label preview -> Save notebook -> detail page.

@vercel

vercel Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
echo-type Ready Ready Preview, Comment Jun 18, 2026 12:23pm

@Talljack
Talljack marked this pull request as ready for review June 18, 2026 12:27
@Talljack
Talljack merged commit ed5a487 into main Jun 18, 2026
6 checks passed
@Talljack
Talljack deleted the codex/practice-notebook-journal branch June 18, 2026 12:29

This branch was successfully deployed

1 active deployment
Preview — f1df7038 Deployed Jun 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant