Skip to content

bug(topics): a session started without a post leaves an untitled row that cannot be deleted #125

Description

@smileygames

目的

セッションを起動しただけで何も発言しなかった起動が、題の無い行を索引に永久に残す。その行は ❌ を持たないため画面から消せず、起動のたびに増える。

起動時に題の無い行が二つ並ぶのはこのためである。一覧の作りと、題の無い行の扱いの両方を直す。

観測

2026-08-28 の実機確認(#123)のあと、logs/main/index.json はこうなっている。

{ "topics": [ { "topic_id": "c2ae614b-…", "title": "",
    "created_at": "2026-08-28T12:41:16.373Z",
    "sessions": { "2d8f9a1a-…": "c6ca0c04-…" } } ] }

この 21:41 の起動でしたことは Claude Lay を起動して終了しただけで、部屋では一言も発していない。それでも索引に題の無い項目が残った。

画面に並ぶ二つの内訳:

  1. いまの起動のトピック — 索引に無く、renderTopics が先頭に足している分
  2. 上の残骸 — 索引に在り、消す手段が無い分

前提

いずれも main49b5fcb)で確認した。

  • TopicRefsrc-tauri/src/room_log.rs:137)の doc は、起動時に行を書かない理由をこう述べている——「A launch opens a new topic (feat(history): split the history into topics, resumable from the list #115, Master 判断5) and most of what an app run does is not speaking, so a row written at launch would be a row for every time the app was opened.」
  • 索引への実体化は realize_from_first_post(同 :323)が本筋で、そこでのみ title_from(content) が題を与える。
  • ところが record_session(同 :396)も realize を呼ぶ。doc は「starting a session in a topic is a deliberate act, and the id has to outlive the run to be worth anything」と述べており、意図的な実体化である。ただしこの経路には題の元になる発言が無く、title は空のまま残る。
  • topicRowsrc/main.ts:1245)の doc は、題の無い行として想定している形を二つ挙げている——「the current topic before anything has been said in it, which is not in the index and has nothing to remove」と「a row the index carries for a file that is not there (bug(history): a session-only topic leaves an index entry with no posts file #117)」。
  • 今回の行はそのどちらでもない第三の形である。索引に在り、実体もあり、それでいて題が無いために ❌ が付かない。
  • startNewTopicsrc/main.ts:1506)は既に在り、パネル見出しの「新規」ボタンから呼ばれている。新しい動きを足す必要はない。
  • 削除の確認ダイアログ(同 :1410)と削除後の状態行(同 :1495)はどちらも topic.title を文へ差し込む。題が空の行では「トピック「」を削除します。」と出る。

決定

決定1(Master 判断): 起動時の未実体トピックを行として描かない。 一覧の上に固定の 新規 項目を置き、そこがその役を負う(Claude のサイドバーの + 新規 と同じ形)。renderTopics が先頭へ架空の行を足す形はやめる。行が「名前の無いトピック」を名乗るのをやめ、新規 が本当のこと——新しいトピックが始まる場所——を言う。

決定2(Master 判断): 索引に在る題の無い行は削除できる。 ❌ を付ける。

決定1 と決定2 は独立でない。 #119 決定5(題の無い行に ❌ を付けない)の理由は「neither is a topic anyone has a reason to delete from here」であり、その「neither」の片方は決定1 が一覧から外す行である。一覧から出た時点で、残る題の無い行——#117 の孤児と、この issue の残骸——はどちらも消したい行になる。決定5 は覆すのではなく、前提が外れる

AI 判断3: 題の無い行は画面上「未記入」と呼ぶ。 確認ダイアログと状態行の差し込みも同じ語を使い、「トピック「」を削除します。」を出さない。Master の語をそのまま採る。

AI 判断4: 部屋が未実体のトピックに居る間、新規 は選択状態で描く。 そうしないと「自分の居る場所が一覧のどこにも無い」状態になり、決定1 が外した架空の行が避けていた問題が形を変えて戻る。

制約

  • record_session が実体化する理由(id が run を越えないと resume の意味が無い)は正当であり、実体化そのものは外さない。この issue は行の見せ方と消し方を直すのであって、いつ索引へ書くかは変えない。
  • 題の無い行の削除は、その行が抱えていたセッションへの戻り道を捨てることでもある。既存のダイアログ文はもともと「セッションへの戻り道が消えます」と述べており、この点は書き替えなくてよい。
  • feat(history): split the history into topics, resumable from the list #115 Master 判断5(起動は新しいトピックを開く)と、TopicRef doc の「起動ごとに行を作らない」は維持する。決定1 は画面の話であって、索引の書き込み条件を変えるものではない。
  • 既存の startNewTopic を使う。新しいコマンドを足さない。

target files

  • src/main.tsrenderTopics / topicRow / 削除ダイアログと状態行の文)
  • index.html新規 の位置と見出し)
  • src/styles.css新規 の選択状態)
  • docs/0-requirements.md

関連

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug動いていない、壊れているready本文が実装開始できる形まで収束している状態。ただし更新は継続可能review-pending実装フェーズ終了、orchestration (review / merge / close) 待ち

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions