Repository navigation
feat: foundation — Home/Drafts, SQLite storage, draft-backed recorder - #1
Merged
Merged
Conversation
Strip create-expo boilerplate to a minimal native-first shell and build the first screen. - Root layout: Stack with gesture root, safe-area provider, system light/dark nav theming, status bar - Theme: add Pulse brand red (#F01E21) accent + border/onAccent tokens for light & dark - Home/Drafts: brand header, elegant empty state, red New (+) FAB - Recorder placeholder route so the + flow is navigable - Switch ios/android npm scripts to dev-build (expo run:*) Verified on iOS simulator in light & dark.
Add the persistence backbone (plan §3) and make Home render real drafts. - Schema: projects + segments with the non-destructive trim model (originalFilename never mutated; trim = in/out ms; split = second row on the same file). Cascade delete segments with their project. - Drizzle + expo-sqlite: single connection (enableChangeListener), foreign_keys pragma, generated migrations applied at startup via a MigrationGate that gates the app until the schema is ready. - babel (inline-import .sql) + metro (.sql sourceExt) for migration bundling. - Home: reactive useLiveQuery with a trim-aware duration aggregate; DraftCard (thumb/name/clip count + duration/relative date); empty state preserved. __DEV__ seed/clear controls to exercise the list pre-recorder. Verified on iOS simulator: migrations run, list reacts to inserts live, effective duration (8.2s + trimmed 3s = 0:11) computed correctly.
Snapshot of build state vs. design docs: what's done (storage layer + app shell), the gaps (build-order inversion, recorder not yet wired through the draft model), and a phased plan (A: persistence seam, B: timeline editor, C: native export, D: upload). Cross-linked to pulse-new-plan.md decisions.
Add the recorder (#2): expo-camera CameraView with just-in-time camera+mic permissions, tap-to-record, bottom segment bar (inline delete), and → to the timeline. Register recorder + timeline as full-screen modals; timeline is a placeholder stub for now. Infra: add expo-camera/expo-video/expo-file-system, Android camera permissions + package id, and a prebuild plugin disabling Xcode script sandboxing so the bundle phase can write ip.txt on device. Segments are still in-memory only — wiring the recorder through the draft model is Phase A (see docs/implementation-status.md).
- Add right-side control rail: flip (facing), flash (enableTorch, back-camera only), and stabilization cycling all four videoStabilizationMode values with a mode caption. - Generate first-frame thumbnails for recorded clips via expo-video's createVideoPlayer + generateThumbnailsAsync (expo-video-thumbnails is deprecated in SDK 56); wait for player readiness so extraction isn't empty, render via expo-image with the icon as a pending fallback. - Inset the segment delete badge so the horizontal ScrollView no longer clips it; dark backing for contrast over bright thumbnails. - Default stabilization to 'off' so the preview FOV matches the recording (no zoom jump at record start; richer modes stay opt-in).
Phase A — close the persistence seam so recorder/editor talk only
through the draft model (no live session object):
- file-store util: move recorded clips cache -> Documents/drafts/{id}/
segments, store relative paths, absolutize at runtime
- draft mutations (create/add/delete/reorder/rename/delete) with
autosave + lastModified bump; segmentsForDraft + firstSegmentFilename
- recorder writes each clip on stop, bar driven by useLiveQuery, resume
by draftId, lazy draft creation, empty-draft cleanup on exit
- thumbnails derived at runtime from the persisted clip (no disk
persistence, no new dep) in both segment bar and draft cards
- native clip duration via expo-video (not a JS timer)
Refactor recorder.tsx (459 -> 114 lines) into a thin orchestrator over
src/features/recorder/ (use-recorder, use-recorder-permissions,
permission-gate, camera-controls, segment-bar, close-button).
Code quality: strip template/redundant comments, drop dead code
(BottomTabInset, MaxContentWidth, ThemedView light/darkColor props),
fix the web color-scheme lint error.
Tooling: add Prettier (config + scripts) and wire eslint-config-prettier.
morepriyam
added a commit
that referenced
this pull request
Jun 13, 2026
feat: foundation — Home/Drafts, SQLite storage, draft-backed recorder
morepriyam
added a commit
that referenced
this pull request
Aug 12, 2026
…advisories Bumps transitive dependency resolutions already permitted by existing semver ranges declared by Expo's own packages and devDependencies: - js-yaml 3.15.0 -> 3.15.1 (babel-plugin-istanbul, dev-only) - js-yaml 4.3.0 -> 4.3.1 (@expo/xcpretty, eslint's @eslint/eslintrc) - brace-expansion 5.0.7 -> 5.0.9 (minimatch used by @expo/cli, @expo/config, @expo/config-plugins, @expo/fingerprint, @expo/metro-config) - brace-expansion 1.1.16 -> 1.1.18 (eslint's minimatch@3) No package.json ranges were changed and no Expo/framework versions were bumped or overridden - these are patch-level fixes already allowed by the existing dependency graph. Closes dependabot alerts #14, #13, #11, #8. Note: the following dependabot alerts remain open and are not fixable via a lockfile refresh: - #17, #16 (image-size DoS): no patched version exists upstream; image-size is archived and pulled in transitively via metro, even on the latest metro/expo releases. Needs an upstream fix in Metro. - #2 (uuid missing bounds check): the xcode package (used by @expo/config-plugins) pins uuid@^7.0.3 and has not bumped it in its latest release. Not practically exploitable here since xcode only calls uuid.v4() with no output buffer (the affected code path is v3()/v5()/v6() with a caller-supplied buffer). - #1 (esbuild dev server): comes from drizzle-kit's deprecated @esbuild-kit/esm-loader dependency, unrelated to Expo/Metro's dev server (already patched). Dev-only, low real-world risk since @esbuild-kit only uses esbuild's transform API, not serve().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Foundation for pulse-new: the app shell, a reactive SQLite storage layer, and a fully draft-backed recorder. Everything flows through the draft model — the seam the recorder and (upcoming) timeline editor both depend on.
What's included
App shell & Home
useLiveQuerylist, draft cards (clip count, trim-aware duration, runtime cover frame), empty state, New (+) FABStorage (SQLite + Drizzle)
projects+segmentsschema encoding the non-destructive edit model (originalFilenamenever mutated; trims/splits are metadata)enableChangeListener(powers live queries) and FK cascadelastModifiedRecorder (Phase A — persistence)
CameraViewwith JIT camera+mic permission gate (Settings fallback)Documents/drafts/{id}/segments/as relative paths, absolutized at runtimesegmentsrow on stop; segment bar driven byuseLiveQuerydraftId; lazy draft creation + empty-draft cleanup on exitStructure & tooling
src/features/recorder/(two hooks + presentational components);recorder.tsxis a thin orchestrator. Convention:components/= shared,features/<screen>/= feature-scopedNot in scope (next)
timeline.tsxis a stub;draftIdis already passed inSee
docs/implementation-status.mdfor the full status, edge-case backlog, and phased plan.Testing
Camera needs hardware (
npx expo run:ios/run:android). Verified on device: record from +, persistence across app kill, resume from a card, delete, reorder, lazy creation, and empty-draft cleanup.