ticket: use base32 project record ids

This commit is contained in:
2026-06-09 22:10:47 +09:00
parent 0803bc3725
commit 4203988d74
798 changed files with 477 additions and 105 deletions
+75
View File
@@ -0,0 +1,75 @@
---
title: "TUI chat view should render Markdown tables"
state: "closed"
created_at: "2026-06-08T10:31:33Z"
updated_at: "2026-06-08T23:36:49Z"
queued_by: "workspace-panel"
queued_at: "2026-06-08T13:13:23Z"
---
## Background
チャットビューの TUI で、Markdown の Table が描画できない問題がある。会話内の Markdown 出力に表が含まれると、ユーザーが内容を読み取りづらくなり、LLM が表形式で整理した結果や比較情報を TUI 上で確認しにくい。
既存 Ticket を確認した範囲では、同じ目的の open Ticket は見当たらない。関連する過去作業として TUI 会話表示・履歴表示・描画境界の修正 Ticket はあるが、本件は Markdown Table 描画の不具合として独立に扱う。
## Requirements
- TUI の通常のチャット / conversation view で、Markdown の pipe table を読み取り可能に描画できること。
- Assistant 出力に含まれる Markdown Table が、raw text の崩れ・欠落・不正な折り返し・表示不能として扱われないこと。
- 表の描画は TUI の既存のスクロール、折り返し、会話履歴表示、色/スタイル規則と整合すること。
- Markdown Table 非対応が原因で message 全体の描画が壊れないこと。
- 修正は表示層の問題として扱い、Pod history / session log / LLM context の内容は変更しないこと。
## Acceptance criteria
- 少なくとも以下のような Markdown Table を含む assistant message が TUI チャットビューで読み取り可能に表示される。
```markdown
| Item | Status |
| --- | --- |
| A | done |
| B | pending |
```
- Table を含まない既存 Markdown / plain text message の表示が退行しない。
- 幅の狭い terminal でも、表を含む message が panic や行欠落を起こさず、既存の折り返し/切り詰め方針に従って表示される。
- 表の描画ロジックに対する unit / snapshot-like test、または明確な手動確認手順が残っている。
## Binding decisions / invariants
- これは chat view の Markdown 表示不具合であり、Ticket panel / `yoi ticket show` / docs rendering / WebFetch extraction の仕様変更として扱わない。
- 表示のために session history、Pod metadata、worker history、prompt context を書き換えない。
- Markdown Table の完全な GitHub Flavored Markdown 互換性をこの Ticket の必須要件にしない。まず通常の pipe table が読み取り可能に表示されることを優先する。
- 表示不能な入力があっても TUI 全体や message block の描画を壊さず、既存の graceful fallback 方針に従う。
## Implementation latitude
- 既存の Markdown rendering path に table support を追加するか、table を readable plain-text fallback として整形するかは実装者が選んでよい。
- Column width 計算、alignment marker の扱い、cell wrapping の詳細は、既存 TUI の制約と実装コストに合わせて選んでよい。
- 実装調査の結果、Markdown renderer / ratatui widget / line wrapping の責務境界に問題が見つかった場合は、最小の設計整理を含めてよい。
## Readiness
- readiness: implementation_ready
- risk_flags: [tui-rendering, markdown]
- open_questions: []
## Escalation conditions
- Table support を入れるために Markdown parser の大きな依存追加や public API 変更が必要になる場合は、実装前に Orchestrator / maintainer に戻す。
- Chat view 以外の TUI surfaces へ広く影響する rendering abstraction 変更が必要になる場合は、範囲拡大として判断を求める。
- GFM 完全互換を目指す必要が出た場合は、本 Ticket の bug fix 範囲を超えるため別 Ticket または設計判断に切り出す。
## Validation
- 関連する TUI / Markdown rendering unit tests を追加または更新する。
- `cargo test` で関連 crate のテストを通す。
- TUI/package/runtime resource に関わる変更のため、完了前に `nix build .#yoi` で package build を確認する。
- 必要なら、Table を含むサンプル message を TUI で表示する手動確認手順を実装報告に残す。
## Related work
- `20260601-013132-tui-new-session-first-message-missing`: TUI 会話ビュー表示の既存修正。
- `20260531-074258-tui-move-view-mode-state`: single-Pod display/history mode の state/render boundary 整理。
- `20260606-060548-workspace-panel-layout-display-tuning`: panel 側の layout/display tuning。対象 surface は異なるため duplicate ではない。
+19
View File
@@ -0,0 +1,19 @@
Implemented, reviewed, merged, and validated.
Summary:
- Enabled Markdown table parsing in the existing TUI chat/conversation Markdown renderer.
- Rendered ordinary pipe tables as readable monospace rows with separators and alignment-aware padding.
- Kept the change in display/rendering code only; no Pod history, session logs, worker history, prompt context, or stored message text mutation.
- Added focused tests for readable table rendering, ragged/wide table safety, and non-table pipe text regression.
Implementation:
- Coder commit: `f767ec7 tui: render markdown pipe tables in chat`
- Reviewer approved with no blocking findings.
- Merge commit: `e6bae04 merge: render tui markdown tables`
Validation after merge:
- `cargo fmt --check`
- `git diff --check`
- `cargo run -q -p yoi -- ticket doctor`
- `cargo check --workspace`
- `nix build .#yoi`
+237
View File
@@ -0,0 +1,237 @@
<!-- event: create author: LocalTicketBackend at: 2026-06-08T10:31:33Z -->
## 作成
LocalTicketBackend によって作成されました。
---
<!-- event: intake_summary author: intake at: 2026-06-08T10:31:40Z -->
## Intake summary
チャットビューの TUI で Markdown pipe table が読み取り可能に描画できない不具合を bug Ticket として整理した。対象 surface は通常の chat / conversation view に限定し、session history / Pod metadata / worker history / prompt context は変更しないことを invariant とした。通常の pipe table 表示、既存 Markdown/plain text の非退行、狭い terminal での安全な表示、関連テストまたは手動確認を受け入れ条件にしている。
---
<!-- event: state_changed author: intake at: 2026-06-08T10:31:40Z from: planning to: ready reason: planning_ready field: workflow_state -->
## State changed
要件・受け入れ条件・invariant・validation が揃っており、Orchestrator が implementation routing できる状態になった。
---
<!-- event: state_changed author: workspace-panel at: 2026-06-08T13:13:23Z from: ready to: queued reason: queued field: workflow_state -->
## State changed
Ticket を `workspace-panel` が queued にしました。
---
<!-- event: state_changed author: orchestrator at: 2026-06-08T13:15:07Z from: queued to: inprogress reason: orchestrator_acceptance field: workflow_state -->
## State changed
Accepted queued implementation after reading the Ticket and current workspace state. This is a bounded TUI chat rendering bug fix and is independent of the active Ticket backend/orchestration-plan worktree, so it can proceed in a separate worktree without overlapping source surfaces beyond normal validation.
---
<!-- event: decision author: orchestrator at: 2026-06-08T13:15:07Z -->
## Decision
Routing decision: implementation_ready
Reason:
- The Ticket is scoped to the normal TUI chat/conversation view and has concrete acceptance criteria for pipe-table readability, non-regression, narrow terminal behavior, and tests/manual confirmation.
- It explicitly excludes Pod/session/history/context changes and non-chat surfaces.
- Current active implementation work is in Ticket backend/orchestration-plan tooling; this TUI rendering fix has low source-conflict risk and can proceed in a separate worktree.
IntentPacket:
Intent:
- Make ordinary Markdown pipe tables in assistant chat messages readable in the TUI conversation view without changing persisted history or model context.
Binding decisions / invariants:
- Only display/rendering behavior should change; do not mutate Pod history, session logs, worker history, prompt context, or stored message text for rendering.
- Target the normal chat/conversation view. Do not treat this as a Ticket panel, `yoi ticket show`, docs rendering, or WebFetch extraction feature.
- Do not pursue full GitHub Flavored Markdown table compatibility unless it falls out naturally from a small implementation; ordinary pipe tables are the acceptance target.
- Rendering must be robust: malformed or too-wide tables should not panic, drop message content, or break the surrounding message block.
- Preserve existing behavior for non-table Markdown/plain text as much as possible.
- Avoid broad rendering abstraction rewrites or new large parser dependencies unless investigation proves they are necessary; escalate first if so.
Implementation latitude:
- Coder may either add explicit table handling to the existing Markdown renderer or normalize table blocks into a readable plain-text fallback within the rendering layer.
- Column width/alignment/wrapping can be pragmatic and constrained by the existing TUI line/wrap model.
- Add unit/snapshot-like tests around the rendering function or a narrow test fixture for chat message rendering. If interactive manual verification is needed, include exact steps in the implementation report.
Escalate if:
- A large Markdown parser dependency or public rendering API redesign is needed.
- The change requires touching broad TUI surfaces outside chat/conversation rendering.
- Correctness would require changing stored message/history representation.
Validation:
- Focused TUI Markdown/chat rendering tests covering a simple pipe table and non-table regression.
- Narrow-terminal/wrapping safety test if feasible.
- Relevant `cargo test -p tui ...` target(s).
- `cargo fmt --check`.
- `git diff --check`.
- `cargo check --workspace`.
- `nix build .#yoi` before final completion because TUI/package behavior changes.
---
<!-- event: implementation_report author: orchestrator at: 2026-06-08T13:16:57Z -->
## Implementation report
Implementation routing started.
Worktree/branch:
- Worktree: `.worktree/tui-chat-markdown-table-rendering`
- Branch: `tui-chat-markdown-table-rendering`
- Base/routing commit: `60609ec ticket: route tui markdown table rendering`
Spawned sibling Coder Pod:
- `coder-tui-chat-markdown-table-rendering`
- Scope: non-recursive read on parent workspace root plus recursive write limited to the child worktree.
Note: an unrelated Ticket record update (`tui-composer-history-persistence` ready state) and project known-issues/objective records were committed before routing so the main workspace was clean enough for implementation side effects.
---
<!-- event: implementation_report author: orchestrator at: 2026-06-08T13:26:21Z -->
## Implementation report
Coder implementation completed and is ready for sibling review.
Coder Pod:
- `coder-tui-chat-markdown-table-rendering`
- Commit: `f767ec7a5945aff588fe0b8ce224b30efe4c2a85 tui: render markdown pipe tables in chat`
- Worktree status before review: clean branch `tui-chat-markdown-table-rendering`
- Stopped after collecting output to reclaim delegated worktree scope.
Implementation summary:
- Adds `pulldown-cmark` table event handling to `crates/tui/src/markdown.rs`.
- Enables `Options::ENABLE_TABLES` in the TUI chat Markdown renderer.
- Converts ordinary Markdown pipe tables into readable monospace rows with box separators and alignment-aware padding.
- Keeps changes in the rendering layer only; no Pod/session/history/context storage changes.
- Adds focused tests for readable table rendering, malformed/ragged/wide safety, and non-table pipe text regression.
Coder-reported validation:
- `cargo test -p tui markdown -- --nocapture` -> 17 passed
- `cargo fmt --check` -> OK
- `git diff --check` -> OK
- `cargo check --workspace` -> OK
- `nix build .#yoi` -> OK
---
<!-- event: review author: reviewer at: 2026-06-08T13:28:34Z status: approve -->
## Review: approve
Approve.
Review evidence:
- Reviewed commit `f767ec7a5945aff588fe0b8ce224b30efe4c2a85` on branch `tui-chat-markdown-table-rendering`; the only changed source file is `crates/tui/src/markdown.rs`.
- The change stays in the TUI Markdown rendering layer: it enables `pulldown_cmark::Options::ENABLE_TABLES` in the existing renderer and collects/renders table events into display-only `Line` output. I did not find changes to Pod history, session logs, worker history, prompt context, or stored message text.
- The renderer is used by the normal assistant chat/conversation rendering path (`ui.rs`) and this commit does not touch Ticket panel, `yoi ticket show`, docs rendering, or WebFetch extraction surfaces.
- Table rendering keeps cell text for ragged/extra-column rows, pads missing cells, computes display widths with `unicode-width`, and falls back to ordinary event handling for non-table Markdown. Tests cover simple tables, alignment, ragged/too-wide safety, malformed table fallback, and non-table pipe text.
Validation run from the worktree:
- `cargo test -p tui markdown -- --nocapture` passed.
- `cargo fmt --check` passed.
- `git diff --check f767ec7a5945aff588fe0b8ce224b30efe4c2a85^ f767ec7a5945aff588fe0b8ce224b30efe4c2a85` passed.
- `cargo check --workspace` passed.
- `nix build .#yoi` passed.
No blocking issues found.
---
<!-- event: implementation_report author: orchestrator at: 2026-06-08T13:29:26Z -->
## Implementation report
Merge-ready dossier for human/orchestrator approval.
Status:
- Implementation branch: `tui-chat-markdown-table-rendering`
- Worktree: `.worktree/tui-chat-markdown-table-rendering`
- Commit under review: `f767ec7a5945aff588fe0b8ce224b30efe4c2a85 tui: render markdown pipe tables in chat`
- Reviewer: `reviewer-tui-chat-markdown-table-rendering`
- Review result: approved; no blocking findings.
Intent / invariant check:
- Makes ordinary Markdown pipe tables readable in the normal TUI chat/conversation Markdown renderer.
- Changes display/rendering behavior only.
- Does not mutate Pod history, session logs, worker history, prompt context, or stored message text.
- Does not expand scope to Ticket panel, `yoi ticket show`, docs rendering, or WebFetch extraction.
- Does not add a new large Markdown dependency or broad TUI rendering abstraction rewrite.
Implementation summary:
- Enables `pulldown-cmark` `Options::ENABLE_TABLES` in `crates/tui/src/markdown.rs`.
- Adds table event collection/rendering into readable monospace rows with separators and alignment-aware padding.
- Keeps ragged/extra-column/wide table content visible and pads missing cells.
- Adds focused tests for simple table rendering, ragged/wide safety, and non-table pipe text regression.
Validation evidence:
- Coder reported pass:
- `cargo test -p tui markdown -- --nocapture`
- `cargo fmt --check`
- `git diff --check`
- `cargo check --workspace`
- `nix build .#yoi`
- Reviewer independently ran and passed:
- `cargo test -p tui markdown -- --nocapture`
- `cargo fmt --check`
- `git diff --check f767ec7a5945aff588fe0b8ce224b30efe4c2a85^ f767ec7a5945aff588fe0b8ce224b30efe4c2a85`
- `cargo check --workspace`
- `nix build .#yoi`
Residual risks / notes:
- This is intentionally a pragmatic table renderer, not a full GFM table compatibility project.
- Final merge/close/cleanup is intentionally not performed here without explicit merge approval.
---
<!-- event: state_changed author: hare at: 2026-06-08T23:36:49Z from: inprogress to: done reason: closed field: workflow_state -->
## State changed
Ticket closed; workflow_state を done に設定しました。
---
<!-- event: close author: hare at: 2026-06-08T23:36:49Z status: closed -->
## 完了
Implemented, reviewed, merged, and validated.
Summary:
- Enabled Markdown table parsing in the existing TUI chat/conversation Markdown renderer.
- Rendered ordinary pipe tables as readable monospace rows with separators and alignment-aware padding.
- Kept the change in display/rendering code only; no Pod history, session logs, worker history, prompt context, or stored message text mutation.
- Added focused tests for readable table rendering, ragged/wide table safety, and non-table pipe text regression.
Implementation:
- Coder commit: `f767ec7 tui: render markdown pipe tables in chat`
- Reviewer approved with no blocking findings.
- Merge commit: `e6bae04 merge: render tui markdown tables`
Validation after merge:
- `cargo fmt --check`
- `git diff --check`
- `cargo run -q -p yoi -- ticket doctor`
- `cargo check --workspace`
- `nix build .#yoi`
---