Skip to content

feat(web): add transcript export to the session menu#87

Merged
wolfiesch merged 3 commits into
LycaonLLC:mainfrom
dylantirandaz:feat/session-export
Jul 20, 2026
Merged

feat(web): add transcript export to the session menu#87
wolfiesch merged 3 commits into
LycaonLLC:mainfrom
dylantirandaz:feat/session-export

Conversation

@dylantirandaz

@dylantirandaz dylantirandaz commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What this changes

  • Adds an "Export transcript" section to the session context menu. It offers two formats: Markdown and JSON.
  • The export contains the same transcript rows the screen shows, in the same order. A provenance header records the project, host, model, export time, and view freshness.
  • The header warns when the export is partial: retained-history truncation, a cached or offline view, or a turn still running.
  • Markdown caps long tool output at 4000 characters per block and says so. JSON carries the rows verbatim.
  • Unknown entry kinds are written into the export, not dropped. The transient working indicator is omitted; the header covers it.

Implements the export row of FEATURE_MATRIX §3 (Markdown and JSON formats; HTML and a native save dialog are not included).

Verification

  • pnpm check passes: release contract, provenance, lint, typecheck.
  • pnpm --filter @t4-code/web test passes: 74 files, 1094 tests. The 15 new tests cover the header warnings, every row kind, the output cap, unknown-entry preservation, JSON fidelity, and filename rules.
  • Opened the menu in a browser on fixture data and confirmed the wiring through React DevTools-level inspection: the export handler receives the current rows and runs both serializers. The download step uses the same Blob-anchor pattern as the existing activity export.

Checklist

  • pnpm check passes (release contract, provenance, lint, typecheck)
  • pnpm test passes; new behavior has a test that fails without this change (ran the @t4-code/web suite; the known packages/client transcript-retention failure on main is unrelated)
  • Any pasted logs or screenshots are redacted: no secrets, tokens, pairing codes, or private paths
  • Ported code (T3 Code / OMP) follows the provenance rules in THIRD_PARTY_NOTICES.md (no ported files touched)

dylantirandaz and others added 3 commits July 19, 2026 19:43
Serialize the derived transcript rows to Markdown or JSON from the session
context menu. The draft rows the screen shows are the export content, with
a provenance header that records the host, model, freshness, and any
completeness warnings. Markdown caps long tool output; JSON carries the
rows verbatim. SessionMain hands the menu a row getter through a ref, so
no second runtime subscription is needed.
@wolfiesch

Copy link
Copy Markdown
Collaborator

Made a few more quick changes:

  • Kept the temporary working row out of JSON exports; active-turn state stays in the export metadata.
  • Protected Markdown tool blocks when arguments or results contain backticks.
  • Merged current main and reran pnpm check plus the full test suite.

@wolfiesch
wolfiesch merged commit fd8e047 into LycaonLLC:main Jul 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants