Skip to content

Post-merge cleanup: honest MSRV and sub-agent sidebar/delete hardening - #120

Merged
marmeladema merged 2 commits into
mainfrom
claude/harness-subagent-review-gk6w44
Jul 24, 2026
Merged

Post-merge cleanup: honest MSRV and sub-agent sidebar/delete hardening#120
marmeladema merged 2 commits into
mainfrom
claude/harness-subagent-review-gk6w44

Conversation

@marmeladema

@marmeladema marmeladema commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Follow-up to #119, addressing the valid CodeRabbit findings from that review.

Declare MSRV 1.88 instead of 1.85 (Cargo.toml, AGENTS.md, README.md). Verified empirically with cargo +1.85 check: the declared 1.85 was already unbuildable before #119 because the locked dependencies time@0.3.53 and plist@1.10.0 require rustc 1.88, and #119 additionally introduced let-chain syntax (stabilized in 1.88) at four sites. CodeRabbit's suggested nested-if rewrite would therefore not have restored 1.85. With the honest declaration, rustc 1.85–1.87 now gets cargo's clean "requires rustc 1.88" error instead of confusing dependency compile failures. The version-aware collapsible_if clippy lint activated by the bump flags the pre-existing nested if lets in giskard-persist; they are collapsed into let chains, matching the style the codebase already adopted.

Cascade-delete view clearing uses the refreshed thread list (app.js). Whether the active transcript view was deleted is now decided from the authoritative sidebar reload after the DELETE, so a descendant that materialized after the last refresh still clears correctly; the pre-request descendant set is kept as a fallback for when the reload fails.

Rootless thread rows stay visible (app.js). appendThreadRows only rendered nodes reachable from a root, so a corrupted parent cycle silently vanished from the sidebar — contradicting the documented guarantee that malformed records remain visible for repair. A guarded second pass now renders any leftover rows without duplicates or recursion risk.

Both app.js behaviors are pinned by new ui.rs static-content assertions, and the stale assertion matching the old delete code is updated.

Validation: cargo fmt / clippy --all-targets -D warnings clean, full workspace suite 461 passed / 0 failed, Playwright suite 11/11 against giskard-server-replay, and cargo +1.85 check confirmed to fail with the clean unsupported-toolchain message.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SV1mewXCgSrpfqpXSThXND


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved thread sidebar rendering to prevent missing/duplicated rows and to keep “rootless”/malformed threads visible for repair.
    • Refined thread deletion so the active thread view stays consistent after cascaded deletion and refresh.
  • Documentation
    • Updated minimum supported Rust version to 1.88 in prerequisites and guidelines.
  • Tests
    • Added end-to-end coverage for cross-project thread deletion behavior.
  • Refactor
    • Internal cleanup of conditional logic while keeping behavior unchanged.

Declare MSRV 1.88: locked dependencies (time 0.3.53, plist 1.10.0) and the
let-chain syntax adopted by the sub-agent feature already require rustc 1.88,
so rustc 1.85-1.87 failed with confusing dependency errors instead of cargo's
clean unsupported-toolchain message. Collapse the nested ifs that the
version-aware clippy lint now flags into let chains.

Decide cascade-delete view clearing from the freshly reloaded thread list, so
a descendant materialized after the last sidebar refresh still clears the
active transcript, keeping the pre-request set as a fallback when the reload
fails.

Render rootless thread rows after the hierarchy pass so a corrupted parent
cycle stays visible for repair, as documented, instead of vanishing from the
sidebar.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SV1mewXCgSrpfqpXSThXND
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9006c56c-31c3-45b2-b4ac-4bfb5065e14b

📥 Commits

Reviewing files that changed from the base of the PR and between 737dde0 and 0fa518c.

📒 Files selected for processing (20)
  • .coderabbit.yaml
  • crates/giskard-harness-codex/src/lib.rs
  • crates/giskard-harness-codex/src/mapping.rs
  • crates/giskard-harness-replay/src/lib.rs
  • crates/giskard-server/src/bin/giskard-server-replay.rs
  • crates/giskard-server/src/highlight.rs
  • crates/giskard-server/src/ledger.rs
  • crates/giskard-server/src/linkify.rs
  • crates/giskard-server/src/live_buffer.rs
  • crates/giskard-server/src/registry.rs
  • crates/giskard-server/src/routes.rs
  • crates/giskard-server/static/app.js
  • crates/giskard-server/tests/diff_accumulation.rs
  • crates/giskard-server/tests/e2e_smoke.rs
  • crates/giskard-server/tests/interrupt.rs
  • crates/giskard-server/tests/running_tasks.rs
  • crates/giskard-server/tests/server_requests.rs
  • crates/giskard-server/tests/turn_controls.rs
  • crates/giskard-server/tests/ui.rs
  • tests/e2e/tests/subagents.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/giskard-server/static/app.js
  • crates/giskard-server/tests/ui.rs

📝 Walkthrough

Walkthrough

The workspace MSRV is raised from Rust 1.85 to 1.88. Rust conditional logic is streamlined without stated behavioral changes. Thread sidebar rendering and deletion cleanup now account for malformed relationships and refreshed project state, with expanded UI and end-to-end validation.

Changes

Thread consistency and support updates

Layer / File(s) Summary
Rust MSRV alignment
AGENTS.md, Cargo.toml, README.md, .coderabbit.yaml
Project guidance, workspace metadata, review rules, and prerequisites now specify Rust 1.88 while retaining Edition 2024.
Persistence and service conditional cleanup
crates/giskard-persist/src/*, crates/giskard-harness-*/src/*, crates/giskard-server/src/*
Nested conditionals are replaced with combined guards across persistence, harness, highlighting, ledger, linking, live-buffer, registry, and route logic.
Thread sidebar and deletion recovery
crates/giskard-server/static/app.js, crates/giskard-server/tests/ui.rs, tests/e2e/tests/subagents.spec.ts
Malformed or cyclic threads remain visible, deletion cleanup uses refreshed project-scoped state, and cross-project deletion behavior is tested.
Event and state assertion cleanup
crates/giskard-server/tests/*
WebSocket, subscription, running-task, persistence, and broadcast test conditions use chained pattern matching while preserving their assertions and polling behavior.

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

Possibly related PRs

  • marmeladema/Giskard#113: Both changes modify crates/giskard-server/src/highlight.rs around Highlighter cache and highlighting behavior.
  • marmeladema/Giskard#119: Related to sub-agent thread rendering and cascaded deletion behavior.

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 65.31% which is insufficient. The required threshold is 80.00%. 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 accurately summarizes the main changes: raising MSRV and hardening sub-agent sidebar/delete behavior.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/harness-subagent-review-gk6w44

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 64: Update the MSRV value in .coderabbit.yaml from 1.85 to 1.88 so
automated Rust review guidance matches the Edition 2024 convention documented in
AGENTS.md.

In `@crates/giskard-server/static/app.js`:
- Around line 1129-1137: Handle loadThreads(pid) separately from the outer
delete failure path: catch refresh errors around the loadThreads call, clear the
active view when deletedIds contains activeThread, and report the refresh
failure through the existing user-visible HTTP/WebSocket error mechanism without
claiming deletion failed. Preserve the authoritative-list check when refresh
succeeds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 355608db-e2a7-4374-9014-2d2a888d5ee1

📥 Commits

Reviewing files that changed from the base of the PR and between 169a1f2 and 737dde0.

📒 Files selected for processing (7)
  • AGENTS.md
  • Cargo.toml
  • README.md
  • crates/giskard-persist/src/config.rs
  • crates/giskard-persist/src/store.rs
  • crates/giskard-server/static/app.js
  • crates/giskard-server/tests/ui.rs

Comment thread AGENTS.md
Comment thread crates/giskard-server/static/app.js
…ing, test it

Collapse every remaining nested `if let` the MSRV-1.88 collapsible_if lint flags
into let chains so `cargo clippy --workspace --all-targets --locked -- -D
warnings` is clean. The earlier MSRV bump only fixed the persist sites; a build
from clean surfaces more across the harness adapters and the server (registry,
routes, live_buffer, ledger, highlight, linkify, the replay binary, and several
integration tests). These are mechanical, behavior-preserving conversions.

Scope cascade-delete view clearing to the deleted thread's project. The active
view is read after the awaits, so a delete in one project must not clear an
unrelated thread the user navigated to in another project meanwhile.

Cover that with an end-to-end Playwright test: two fresh projects, view a thread
in one, delete a thread in the other, and assert the active selection survives.
It creates threads through the start API to avoid the shared composer's
WebSocket-open timing, and is verified to fail without the project-scope guard.

Align `.coderabbit.yaml`'s stated MSRV with the 1.88 bump.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SV1mewXCgSrpfqpXSThXND
@marmeladema
marmeladema merged commit a69d19f into main Jul 24, 2026
6 checks passed
@marmeladema
marmeladema deleted the claude/harness-subagent-review-gk6w44 branch July 24, 2026 11:55
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.

2 participants