Rituals pattern: code and file output #186

Open
opened 2026-10-04 20:20:35 +00:00 by peterswimm · 0 comments
Owner

Part of #177.

What it's for: a ritual produced code, config or files. Show it readably, and make it easy to copy or save.

Where it shows up today

  • Flutter: ritual_output_view.dart tries to show blocks, then plain text, then raw JSON in a scroll box. There's no syntax highlighting.
  • macOS: shown in a chat bubble
  • CLI: plain text
  • No code block type exists.

Please design

  • A single code snippet: language label, syntax colours (from tokens, in light and dark), line numbers, copy, and wrapping vs scrolling
  • Several files: a file tree or tabs, with save one or save all
  • Long output: collapse and expand

Acceptance criteria

  • Code block spec with token names for every syntax colour, contrast-checked in both themes.
  • Multi-file variant.
  • Say whether code becomes a new block type. Decided: yes (#177).
  • CLI version (what's printed, and how files are written).
Part of #177. **What it's for:** a ritual produced code, config or files. Show it readably, and make it easy to copy or save. ## Where it shows up today - Flutter: [`ritual_output_view.dart`](https://git.toilville.dev/toilville/toilville_rituals/src/branch/main/lib/widgets/ritual_output_view.dart) tries to show blocks, then plain text, then **raw JSON in a scroll box**. There's no syntax highlighting. - macOS: shown in a chat bubble - CLI: plain text - No `code` block type exists. ## Please design - A single code snippet: language label, syntax colours (from tokens, in light and dark), line numbers, copy, and wrapping vs scrolling - **Several files**: a file tree or tabs, with save one or save all - Long output: collapse and expand ## Acceptance criteria - [ ] Code block spec with token names for every syntax colour, contrast-checked in both themes. - [ ] Multi-file variant. - [x] Say whether `code` becomes a new block type. **Decided: yes ([#177](https://git.toilville.dev/Toilville/toilville-design/issues/177#issuecomment-26060)).** - [ ] CLI version (what's printed, and how files are written).
Sign in to join this conversation.
No description provided.