2026-05-19 に digitaldemocracy2030/kouchou-ai の PR #802 / Issue #800 と、work/kouchou-ai/ の current origin/main を照合した観測メモ。PR は apps/public-viewer/components/report/Overview.tsx の {result.config.question} を {result.config?.question} に変える 1 行差分だけを含む。github-dev-docsより
Observations
PR #802は 2026-02-22 作成の draft PR で、2026-05-19 時点でもstate: OPEN,draft: true,mergeable: true,mergeable_state: blocked,reviewDecision: REVIEW_REQUIRED- review comment / review thread / status checks はいずれも実質空で、ready for review に上がっていない
- PR 本文は
Overview.tsxが「report data fully loads 前」に落ちる可能性を述べるが、currentapps/public-viewer/app/[slug]/page.tsxではawait fetch(.../reports/${slug})後にOverviewを render しており、少なくともこの component 単体には「ロード前 render」という経路は見えない。source-codeより - current
apps/public-viewer/type.tsではResult.configは optional ではなく必須型 - current
apps/public-viewer/components/report/Analysis.tsx、app/[slug]/page.tsx、app/[slug]/_op-image.tsxなどでもresult.config.*を直接参照しているため、Overview1 箇所だけ optional chaining 化しても「config欠損データに耐える viewer」にはならない。source-codeより
Interpretation
- もし API が本当に
config欠損のResultを返しうるなら、問題はOverview局所ではなく 型契約または fetch 後 validation の不足 とみる方が自然 - 既存コードには
components/charts/plugins/validation.tsの runtime validation 基盤があるが、現状config欠損までは検査していない。Overviewでだけ握りつぶすと、欠損データが metadata / OGP / analysis section では引き続き壊れる
Open Questions
reports/:slugAPI は実際にconfig欠損 payload を返しうるのか、それとも issue の再現は過去 tree か一時的不整合に限られるのか- viewer 側の期待動作は「
config欠損なら最低限表示継続」なのか、「不正データとして notFound / error fallback に落とす」なのか
Updates
- 2026-05-19: 初版作成