Skip to content

fix(tui): keep a topicless room's app pane in that room - #178

Merged
allenhutchison merged 3 commits into
mainfrom
tui-pane-topicless-room
Oct 29, 2026
Merged

allenhutchison merged 3 commits into
mainfrom
tui-pane-topicless-room

Conversation

@allenhutchison

@allenhutchison allenhutchison commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Human overview

Opening Todos or Notes for a room whose topics are all archived left the current conversation in the previous room, so Esc went back there while the header and sidebar said the new room. Now such a room gets a conversation with no topic, so header, sidebar marker and Esc all agree on it. Closes #165

AI reviewer

  • _open_pane (src/pepper_cli/tui/app.py): when switching rooms it now always calls open_conversation, with Conversation(room_id, None) if topics_by_recency is empty. No archived topic is opened. The pane is still up during the switch, so open_conversation hides it and marks nothing read behind it, as before.
  • Why a topic-less Conversation is safe: poller.fetch_topic already returns an empty page for topic_id is None; _note_viewed, the mark publisher and stream handling already guard on topic_id is None; header_text already falls back to the room name.
  • Esc choice: _close_pane is unchanged. Esc lands in that room's (empty) thread, showing "(no messages)" under the header "Room". I chose this over jumping to the Pepper DM so Esc matches the header and sidebar, per design §10 (a pane belongs to one room).
  • Posting guard: on_composer_submitted refuses a send when current.topic_id is None with a notice and keeps the draft text. Without it a send would target a None topic.
  • Rejected: opening the first archived topic (shows a read-only archived thread the user did not ask for).
  • Kept small for overlap with feat(tui): todo actions in the Todos pane (P2) #173 (tui-todo-actions-p2): only _open_pane and one branch in on_composer_submitted.
  • Test: test_a_room_with_only_archived_topics_opens_its_pane_in_that_room_and_esc_stays fails without the fix (current stays in room A) and passes with it.
  • Verification: ruff format, ruff check, ty check clean; uv run pytest --cov: 2657 passed, 2 skipped, coverage 95.1% (floor 88).
  • simplify: reviewed directly (diff is ~10 lines); nothing to change. code-review (medium): the skill ran against the umbrella checkout rather than this worktree, so it did not review this diff; not counted as a self-review here.

Checklist (repo-specific)

  • uv run ruff format --check and uv run ruff check clean (no new lint ignores)
  • uv run ty check src/pepper_cli/ clean
  • uv run pytest passes; coverage floor in .claude/maintainerd.json not lowered
  • Server-contract changes: none, N/A
  • No token or credential is logged, printed, or put in a fixture
  • README and the bundled SKILL.md: no command or output change, N/A

🤖 Generated with Claude Code

https://claude.ai/code/session_01QNDeh8M8jKfHhtWGJwkxTm

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; both previous findings are fixed.

Summary

Keeps a topicless room's app pane and conversation in the same room.

  • Room apps stay tied to rooms with no unarchived topics.

Reviews (2) · Last reviewed commit: "test(tui): a refused topicless-room send..." · Reviewed by Greptile

Opening a room's Todos/Notes pane when the room has only archived topics
left the current conversation in the previous room, so Esc returned there.
Give such a room a conversation with no topic instead; posting from it is
refused with a notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNDeh8M8jKfHhtWGJwkxTm
@vycari-review

vycari-review Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Vycari Review (shadow)

Shadow round 2 on bd2ceff. This comment is non-gating and needs no response: it is collected to measure agreement with the current reviewer. The round's verdict is the Vycari Review (shadow) check run.

Open: P0 0 · P1 0 · P2 0 · confirmed fixed 1 · withdrawn 0

Judge's notes

The one open finding from the last round is fixed: the sidebar marker for a room with no open topic now points at that room's own row, and a test checks it. No new candidates survived review, so the change looks correct as far as this review can tell.

No open findings this round.

Confirmed fixed

  • VR-06dcf3ed · Topicless room after Esc shows no current marker in the sidebar, contrary to the PR's claim that sidebar and header agree

Comment thread src/pepper_cli/tui/app.py
Comment thread tests/test_tui_apps.py
allenhutchison and others added 2 commits October 29, 2026 06:04
A room opened with no topic (for its app pane) used `topic:None` as the
sidebar's current key, so after Esc closed the pane no row was drawn as
open. Key such a conversation to the room's row through one helper used
by every place that selects or marks the open conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNDeh8M8jKfHhtWGJwkxTm
@allenhutchison

Copy link
Copy Markdown
Contributor Author

Round 1 summary (Greptile 4/5 on 71e7aa4, from the PR description block):

  • current room loses its sidebar marker: fixed in 2edfab6 (state.sidebar_key, plus a test)
  • lost-draft assertion: added in bd2ceff

Pre-flight (format, lint, ty, full pytest with coverage at 95.1% against a floor of 88) is green on bd2ceff.

@allenhutchison
allenhutchison added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 8a35d81 Oct 29, 2026
5 checks passed
@allenhutchison
allenhutchison deleted the tui-pane-topicless-room branch October 29, 2026 19:47
allenhutchison added a commit that referenced this pull request Oct 29, 2026
…less room's notes write to it

With #173's todo keys on the same PaneScroll, space is two bindings that
check_action keeps apart by pane. Pin that, and that a room opened with no
topic (#178) still sends its note writes to that room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNDeh8M8jKfHhtWGJwkxTm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI: opening a room's app pane when the room has only archived topics leaves the current conversation in another room

1 participant