Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c0b5914
feat: connect add memory UI
nonnil May 11, 2026
6855a01
fix: keep add memory route helper bundled
nonnil May 12, 2026
4d30196
feat: migrate importer extraction to defuddle
nonnil May 12, 2026
e71056d
backup memory 019e1be9-a10b-79eb-9e82-1e1570bca605
nonnil May 12, 2026
1432ee5
backup memory 019e1be9-e7b9-7af1-a1fd-eb222ee75d22
nonnil May 12, 2026
a31776e
backup memory 019e1bea-3256-7e41-b73c-2017b1254916
nonnil May 12, 2026
94b3722
backup memory 019e1bea-c427-7b4b-b503-bbb2e23a5a4c
nonnil May 12, 2026
4911d92
backup memory 019e1bec-e670-77b8-9258-bc7869622925
nonnil May 12, 2026
018c19e
backup memory 019e1bea-c427-7b4b-b503-bbb2e23a5a4c
nonnil May 12, 2026
9928286
chore: capitalize TRAUMA title
nonnil May 12, 2026
d9c9e9d
docs: investigate OpenAI import challenge
nonnil May 12, 2026
af5dc0a
docs: plan browser-assisted import extension
nonnil May 12, 2026
0a8d795
feat: add browser-assisted import extension
nonnil May 12, 2026
3409a23
docs: document env configuration surface
nonnil May 12, 2026
f5909b8
docs: keep env example minimal
nonnil May 12, 2026
95a6f84
feat: extract live tab content in browser extension
nonnil May 12, 2026
54e4149
feat: add backup environment failsafe
nonnil May 12, 2026
224b159
test: cover backup failsafe cli migration
nonnil May 12, 2026
09dd6a7
docs: record planned PR review responses
nonnil May 12, 2026
6bf7f23
fix: address PR review backlog
nonnil May 12, 2026
a0d5768
fix: harden backup failsafe recovery
nonnil May 12, 2026
69a7a43
test: provide git identity for failsafe migration
nonnil May 12, 2026
6209a2c
fix: address backup failsafe review blockers
nonnil May 13, 2026
8833467
test: align reader e2e fixture backup config
nonnil May 13, 2026
dde7a63
fix: address codex browser import review
nonnil May 13, 2026
f48afcc
fix: address mandatory codex review findings
nonnil May 13, 2026
49b2b48
fix: address codex review boundary findings
nonnil May 13, 2026
b1bf354
fix: harden backup and import review boundaries
nonnil May 13, 2026
82d926c
fix: classify backup content integrity alerts
nonnil May 13, 2026
0573135
fix: add missing backup record recovery
nonnil May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# Trauma local development environment.
# Trauma local browser import environment.
#
# Copy this file to `.env` (the project gitignores `.env`) and adjust values.
# Bun loads `.env` automatically for `bun run` scripts, so the values below
# flow into the dev/start servers, the dev smoke check, and Playwright's
# webServer configuration unless overridden by the shell.
# Bun loads `.env` automatically for `bun run` scripts.
Comment thread
nonnil marked this conversation as resolved.

# Bind address for `bun run dev` and `bun run start`.
# Use `127.0.0.1` (loopback only) for the no-auth local model.
HOST=127.0.0.1

# Port used by `bun run dev` and `bun run start`.
PORT=3000

# Base HMR port used in `app.config.ts`. Server and server-function routers
# use the next two ports (default: 24678 / 24679 / 24680).
TRAUMA_HMR_PORT=24678
# Browser-assisted imports are disabled by default. Enable only for local
# development with a random token that is also configured in the extension.
TRAUMA_BROWSER_IMPORT_ENABLED=false
TRAUMA_BROWSER_IMPORT_TOKEN=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ playwright-report/
test-results/
.trauma/
data/
/~/
/.serena/
/config.json
/trauma.config.json
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Create the local environment file from the example:
cp .env.example .env
```

`.env` is gitignored. It controls the dev/start bind address (`HOST`),
listening port (`PORT`), and base HMR port (`TRAUMA_HMR_PORT`). The defaults
in `.env.example` bind loopback only (`127.0.0.1:3000`); adjust as needed.
`.env` is gitignored. Keep it for local TRAUMA settings such as browser import.
The `dev`, `start`, and `preview` scripts default `HOST` to `127.0.0.1` unless
you set another host in the shell.

Run the dev server:

Expand Down
36 changes: 34 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions docs/architecture/flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ link-only memory. Record extraction status and error details in SQLite.

Raw HTML is not stored in the initial design.

Default extraction runs behind an interruptible runtime boundary. The import
timeout budget covers fetch, validation, parser work, and markdown conversion;
if the budget is exhausted, the importer returns link-only fallback instead of
persisting late extraction output.

## Browser-Assisted Import

Safari, browser extension, or share-sheet assisted capture is future work.
Expand Down Expand Up @@ -72,6 +77,10 @@ Selection payload:
If persistence fails, the optimistic UI state is rolled back or surfaced as
failed.

If highlight persistence returns backup failsafe metadata, the frontend must
refresh the global backup failsafe alert before showing the local highlight
failure state.

## Git Backup

Backup is built-in git backup, not a generic hook system.
Expand All @@ -91,3 +100,31 @@ Backup failures do not roll back memory creation or highlight creation.
On startup, Trauma should find pending, queued, or failed backup states that are
eligible for retry and re-enqueue them. `queued` is process-local, so queued rows
from a previous process are eligible after restart.

Backup failsafe recovery actions must be retry-safe. If migration already
copied a file before a later git step failed, rerunning migration may accept the
existing target only when its bytes match the source. Different target content
remains a hard conflict.

Backup readiness is tied to the full backup identity, not just filesystem
paths. The persisted stamp must match project path, store path, git remote,
remote URL, branch, and already-successful tracked content before new writes are
accepted. If the repository is recreated at the same path, or the configured
remote/branch changes while successful backup rows already exist, Trauma must
force an explicit recovery path instead of silently treating the new repository
as complete.

When already-successful backup rows point at missing, out-of-scope, or
untracked content, the alert is a content-integrity failure rather than a path
drift. The UI and logs must not describe this as a backup location change or
offer path migration as a remedy.

Only `missing_file` content-integrity alerts may offer deletion of the orphan
SQLite memory record. If the content still exists but is untracked or outside
the configured paths, recovery must preserve the record and require backup
repository/path repair instead.

If migration commits local backup content but the configured push fails, the
operator must be able to retry that recovered push after repairing the remote.
A push-failure alert must not turn a completed local migration into an
unrecoverable banner state.
Loading
Loading