Skip to content

fix(web): separate cleanup results by environment - #19753

Closed
maria-rcks wants to merge 3 commits into
mainfrom
t3/storage-cleanup-card-environments
Closed

maria-rcks wants to merge 3 commits into
mainfrom
t3/storage-cleanup-card-environments

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

With several environments, the storage cleanup card repeated the same "Last run ... recovered." line for each one, joined every environment's counts into one long " · " line, showed "0 removed, 0 kept" for environments with no rules, and couldn't tell apart environments with the same label (containers often all report hostname "t3").

Each environment now gets its own settings row with its counts, bytes recovered, and run time. When labels collide, the row adds the environment address, e.g. "t3 · http://localhost:7204/". Environments with no worktree, browser-artifact, or log rules stay listed, marked "No cleanup rules enabled." instead of showing zero counts. A custom project worktree rule counts as enabled. With one environment the card looks the same as before, and the controls and the Delete now action are unchanged.

On Blacksmith, the 11 StorageSettings.test.tsx tests, the six settingsScopeAxis.test.ts tests, the web typecheck, and lint for both changed files passed. I checked it in the web client against three isolated servers all named "t3": one with a successful deletion, one with a permission failure, and one with no rules. I also checked single-environment scope, the expanded results, light and dark themes, and an 800px viewport. The before and after captures use the same cleanup reports. Desktop wraps the same component; native desktop and mobile weren't exercised.

Before: main with three environments named t3

After: one row per environment, light theme

After: one row per environment, dark theme

After: single environment, unchanged layout

After: rules disabled, last run expanded

Disabling the final rule leaves Last run inspectable. The server's existing automatic sweep replaces the preceding failure report with a no-op report. Mixed-version connections were not exercised.

Written by gpt-6.1-sol (Codex) in T3 Code on behalf of Maria.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 15, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 15, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f20cc2b

Macroscope's review found this PR approvable — This is a localized web UI fix that separates existing cleanup summaries by environment and improves duplicate-label handling without changing cleanup execution, settings defaults, or data contracts. The accompanying changes are test-only coverage and the implementation remains small and self-contained.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 15, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 15, 2026 03:51

Dismissing prior approval to re-evaluate 0daaef8

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 4.9 KiB 5.0 KiB +23 B (+0.5%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB +23 B (+1.9%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.8 KiB 20.9 KiB +41 B (+0.2%) 29.3 KiB ✅
Codex Live turn messages 1 2 +1 (+100.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB +24 B (+0.5%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB +24 B (+2.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB +41 B (+0.2%) 29.3 KiB ✅
Claude Live turn messages 1 2 +1 (+100.0%) 8 ✅

Baseline: e536bfd · PR result: f20cc2b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0573801e-aa4f-4dfb-95df-7c3c525c3a66
📥 Commits

Reviewing files that changed from the base of the PR and between 0daaef8 and f20cc2b.

📒 Files selected for processing: 2
  • apps/web/src/components/settings/StorageSettings.test.tsx
  • apps/web/src/components/settings/StorageSettings.tsx

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

📝 Walkthrough

Storage settings now detect enabled cleanup rules and display cleanup status and reports by environment. Multi-environment summaries and cleanup error messages use scope-aware labels.

Changes: Storage cleanup settings

Layer / File(s) Summary
Cleanup rules and tests
apps/web/src/components/settings/StorageSettings.tsx, apps/web/src/components/settings/StorageSettings.test.tsx
The component exports storageCleanupHasRules to detect enabled browser-artifact, log, and worktree cleanup rules. Tests cover individual rules and project overrides.
Per-environment cleanup status and reports
apps/web/src/components/settings/StorageSettings.tsx
The cleanup section uses scope-aware environment labels and displays per-environment rule status and report counts. Multi-environment mode shows per-environment descriptions and limits the folded last-run summary to single-environment mode.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: bil0000

Merge Risk: ⚪ Minimal · up to f20cc

No actionable issue is established for the per-environment cleanup display; the change is mergeable after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description clearly explains the problem, the implementation, the verification performed, UI evidence, and known test limitations. It does not provide the required Scope and approval information, … Add a Scope and approval section. Link the triaged issue or maintainer approval with the approval comment. If no prior issue or discussion exists, explain why this focused fix addresses an obvious bug and qualifies for the repository's appr…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: separating storage cleanup results by environment.
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.
Full details: Description check

Explanation

The description clearly explains the problem, the implementation, the verification performed, UI evidence, and known test limitations. It does not provide the required Scope and approval information, such as a linked issue, maintainer approval, or an explanation that this focused fix qualifies for an exemption.

Resolution

Add a Scope and approval section. Link the triaged issue or maintainer approval with the approval comment. If no prior issue or discussion exists, explain why this focused fix addresses an obvious bug and qualifies for the repository's approval exemption.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@macroscopeapp
macroscopeapp Bot dismissed their stale review October 15, 2026 04:22

Dismissing prior approval to re-evaluate 9997f25

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 15, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Note

Grok responding on behalf of Julius.

Superseded by #19744, which already reworks the Storage last-run card for multiple machines (identical results fold to one "on every machine" line, and colliding labels get a host:port). Closing this earlier per-environment-row approach so it does not fight what just landed on main.

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

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants