Skip to content

feat(sidebar): integrate RDD lifecycle and session resets (3/4) - #1500

Merged
Alan-TheGentleman merged 2 commits into
Gentleman-Programming:mainfrom
MarsSall:feat/rdd-status-sidebar-03-runtime-integration
Sep 27, 2026
Merged

Alan-TheGentleman merged 2 commits into
Gentleman-Programming:mainfrom
MarsSall:feat/rdd-status-sidebar-03-runtime-integration

Conversation

@MarsSall

@MarsSall MarsSall commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

Refs #1306 (status:approved). This is slice 3 of 4; the issue remains open for the separate follow-up.

PR type

  • New feature (type:feature)

Summary

  • Connect the existing display-only RDD publisher to the three review tools and the Status sidebar.
  • Reset publisher and displayed state on session start, tree navigation, and shutdown.
  • Add real-tool integration coverage proving stale pending completions publish nothing after session replacement or same-session tree navigation, while fresh results render normally.

Chain context

Sequential, independent PRs to main:

#1319 contract/renderer (merged)
  → #1379 publisher/correlation (merged)
    → 📍 this PR: runtime wiring + lifecycle integration tests
      → PR4: optional display/correlation refinements (not included)

Starts from 53d62fbf311d887dc5fce6d9533010bf02b7603e, after #1379 merged. Ends with runtime integration and the session-reset coverage requested in Alan's review. No review authority, polling, history, or global-mode changes. Nested workspace display correlation, explicit abort presentation, and completion-resolver extraction remain separate. Vim/editor test-harness repair is out of scope (#1430).

Changes

File Change
extensions/gentle-ai.ts Wrap review tools and reset publisher at lifecycle boundaries
extensions/gentle-shell.ts Consume session-matched snapshots, render and clear Status state
tests/gentle-shell.test.ts Pending-completion, direct publisher-event, fresh-result, foreign-session and shutdown coverage

Review size: 3 files, +129/-6 = 135 changed lines. No dependency, generated-runtime, or task artifacts included.

Verification

  • Focused real-tool reset integration: 1/1 passed, independently rerun after final coverage changes.
  • Native review parity/routing: 99/99 passed.
  • Type check: 188 recorded diagnostics, no regressions.
  • Runtime-module check: seven modules match.
  • Provider contract check passed; runtime harness exited 0.
  • git diff --check: passed.
  • Native review of the final 135-line candidate: approved and acknowledged.
  • Sensitivity probes fail without the respective producer reset hooks; restored hooks pass. No historical test-first RED is claimed.

Known failing checks — not a green full suite

node --experimental-strip-types --test --test-reporter=tap tests/gentle-shell.test.ts tests/rdd-status-line.test.ts tests/review-sidebar-state.test.ts: 245/256 passed, with 11 Unsupported Pi editor layout/version failures. An untouched archive of exact base HEAD reproduced the same 11 test names/messages (244/255 passed).

node --experimental-strip-types --test tests/*.test.ts: 3884 passed, 14 failed, 43 skipped. Targeted untouched-base runs reproduced the remaining three Vim constructor-identity failures as well. The full untouched-base run timed out after 300 seconds, so complete full-suite equivalence is not claimed. The final follow-up changed test coverage only; it reran the focused test, three-file suite, types and diff checks, not the full unit suite. See #1430 for the separate harness issue; production Vim guards were not changed.

Contributor notes

  • Approved issue linked; one feature label requested.
  • Conventional commit; no co-author trailers.
  • No shell scripts or skills changed; shellcheck/skill smoke checks are not applicable.
  • No merge requested automatically; hosted CI still needs to run.

Summary by CodeRabbit

  • New Features

    • Review information for the active session now appears in the sidebar and footer, with the sidebar updating when review data changes.
  • Bug Fixes

    • Results from outdated session activity or other sessions no longer replace the current review information.
    • Review information is cleared when a session starts, ends, or changes its navigation tree, and later events cannot restore it after shutdown.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 22b99d20-cb42-4f7d-b4e2-73a14baa93d1

📥 Commits

Reviewing files that changed from the base of the PR and between e897c2a and c87efa9.

📒 Files selected for processing (2)
  • extensions/gentle-shell.ts
  • tests/gentle-shell.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Gentle AI now publishes review-sidebar updates from review tools. Gentle Shell validates snapshots for the active session, updates the footer, and clears review data on session lifecycle changes. Integration tests cover stale and foreign-session events, tree navigation, and shutdown.

Changes

Review sidebar integration

Layer / File(s) Summary
Publish review updates
extensions/gentle-ai.ts
Gentle AI wraps the grouped review-capture, single review-capture, and review-controller tool registrations with a review-sidebar publisher. It resets the publisher on session-tree changes, session start, and shutdown.
Display session-scoped snapshots
extensions/gentle-shell.ts, tests/gentle-shell.test.ts
Gentle Shell validates snapshots for the active session, stores accepted state and scope in the footer model, and clears them on tree changes, session start, and shutdown. Tests cover stale completions, foreign-session events, and post-shutdown events.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GentleAI as Gentle AI review tools
  participant Publisher as Review sidebar publisher
  participant Event as Review-sidebar event
  participant Shell as Gentle Shell
  participant Footer as Footer model
  GentleAI->>Publisher: Wrap review tool registrations
  Publisher->>Event: Publish review-sidebar updates
  Event->>Shell: Deliver review snapshot
  Shell->>Footer: Store snapshot and redraw
Loading

Suggested reviewers: alan-thegentleman

Merge Risk: ⚪ Minimal · up to c87ef

No actionable merge-blocking issue is established; the PR is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to c87ef

The new display path has controls for session identity, stale completions, and shutdown. No security defect was established, but the broader security coverage and trust assumptions for shared events remain incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The traced outcome is the local session's review-status display, not review authorization or a demonstrated cross-session change.

Trust Boundaries and Controls

  • observed — The consumer checks session identity and snapshot shape, but does not authenticate the event producer or bind an event to a tree generation. The publisher's generation gate supplies that protection for its own stale completions; an attacker-controlled same-session emitter was not established.

Resilience and Maintainability Implications

  • observed — Producer-side invalidation and consumer-side clearing address both late asynchronous completion and stale visible state at the tested lifecycle boundaries.

Hardening Proposals

  • proposed — If extensions that share the event bus are outside the trusted display boundary, consider binding accepted events to the publisher or a tree generation so a same-session emitter cannot supply misleading display state.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: sidebar integration of the RDD lifecycle and session resets. The scope marker “3/4” is relevant and does not reduce clarity.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Share one harness across stale session_start, stale session_tree, and foreign/shutdown cases; use REVIEW_SIDEBAR_EVENT and explicit holds instead of a call count. Document why the shutdown unsubscribe is safe.
@Alan-TheGentleman Alan-TheGentleman added the type:feature New feature label Sep 27, 2026
@Alan-TheGentleman
Alan-TheGentleman merged commit 4f5ab39 into Gentleman-Programming:main Sep 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants