trips/mock
Greg Pomerantz bf72fdf32d mock: server-side per-trip store — originals, parsed docs, conversation
Context and documents now live on the server between turns (and across
reloads), per project, as requested:

  mock/store/<trip>/docs/<docId>-<file>        ORIGINAL uploaded bytes
  mock/store/<trip>/docs/<docId>-<file>.txt    extracted text (+ header)
  mock/store/<trip>/chat.jsonl                 full LLM conversation

Endpoints: GET /trip-store/:trip (manifest incl. doc texts),
GET .../doc/:docId, GET .../chat (last 100 turns), POST .../doc,
POST .../chat. /parse-doc's extraction factored into shared finishParse()
so both paths use identical logic. The store dir is gitignored (PII).

Client: enterTrip rehydrates tripDocs + chatLog from the server
(loadTripStore, race-guarded, one-time migration of localStorage docs
from older builds), re-renders past turns in the chat panel, and
askLLM persists each turn fire-and-forget. localStorage now carries
only the plan state.

Verified end-to-end: drop 133 KB email → direct re-anchor, original +
parsed files on disk, both turns in chat.jsonl → full page reload →
doc chip, document and conversation restored from the server → question
asked without re-upload answered correctly (AK-77Q2ZD, 14C/22A).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-09 15:31:06 -04:00
..
scripts multi-trip mock + Colombia trip with a real walking router 2026-09-09 09:44:29 -04:00
app.js mock: server-side per-trip store — originals, parsed docs, conversation 2026-09-09 15:31:06 -04:00
data.js multi-trip mock + Colombia trip with a real walking router 2026-09-09 09:44:29 -04:00
index.html mock: robust booking-doc extraction + documents persist across turns 2026-09-09 14:16:36 -04:00
server.js mock: server-side per-trip store — originals, parsed docs, conversation 2026-09-09 15:31:06 -04:00
styles.css mock: robust booking-doc extraction + documents persist across turns 2026-09-09 14:16:36 -04:00