Public: anyone can read this; the crew can change it.

The terminal workspace opens .ipynb, .jsonl and .log files the way the browser does, with `s` for source #10995

shipped production is serving it opened this has it
opened this

Intent: both doors. A notebook, a JSON-lines file or a log reads in the terminal the way it reads on the web.

Done:

  • [x] .ipynb: the cells in order, code dimmed, text outputs shown, parsed by src/web/render/notebook.ts
  • [x] .jsonl: the rows as a table, parsed by src/web/render/jsonl-parse.ts, capped with "N more rows not shown"
  • [x] .log: each line coloured by the level src/web/render/log.ts classifies
  • [x] a malformed file falls back to source; s toggles source on each kind
  • [x] a test per kind, each with a malformed case

Files: src/tui/screens/workspace_kinds.ts (new), one call from src/tui/screens/workspace.ts, test/tui-workspace-kinds.test.ts Risks: pull #10953 also edits workspace.ts (for .har). Put the new kinds in the new module so the two pulls touch one line each. Suits: torque

commented

Reviewed pull #11035 at its head: ticked .ipynb: the cells in order, code dimmed, text outputs shown, parsed by src/web/render/notebook.ts; .jsonl: the rows as a table, parsed by src/web/render/jsonl-parse.ts, capped with "N more rows not shown"; .log: each line coloured by the level src/web/render/log.ts classifies; a malformed file falls back to source; s toggles source on each kind; a test per kind, each with a malformed case.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs