Skip to content

Redesign --apply output#433

Merged
bl-ue merged 2 commits intomainfrom
redesign-apply-output
Jan 29, 2026
Merged

Redesign --apply output#433
bl-ue merged 2 commits intomainfrom
redesign-apply-output

Conversation

@bl-ue
Copy link
Member

@bl-ue bl-ue commented Jan 29, 2026

--apply now shows a detailed list of all the patches that were applied.

Summary by CodeRabbit

Release Notes

  • New Features

    • Redesigned --apply output to display patch application results organized by category
    • Added --show-unchanged flag to filter which patches appear in results display
  • Bug Fixes

    • Improved error reporting for missing patch patterns during application

✏️ Tip: You can customize this high-level summary in your review settings.

@bl-ue bl-ue enabled auto-merge (squash) January 29, 2026 16:18
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR redesigns the patch application output system by introducing structured result types (PatchGroup enum, PatchResult interface, ApplyCustomizationResult), centralizing patch application logic into a unified patches array in applyCustomization, updating return types to include detailed patch results, and modifying display consumers to render and handle these results.

Changes

Cohort / File(s) Summary
Patch System Infrastructure
src/patches/index.ts
Major refactor centralizing patch application: introduces PatchGroup enum, PatchResult interface, and ApplyCustomizationResult; changes applyCustomization return type from TweakccConfig to ApplyCustomizationResult; replaces ad-hoc patch calls with unified patches array; implements applyPatches helper with structured execution and result tracking; sorts system prompts alphabetically and precomputes common config values.
System Prompts Patch
src/patches/systemPrompts.ts
Introduces SystemPromptsResult type; replaces PatchApplied with SystemPromptsResult return type; shifts from accumulated character-count aggregation to per-prompt result tracking (id, name, group, applied, details); updates imports to use PatchResult and PatchGroup.
Patch-Specific Implementations
src/patches/subagentModels.ts, src/patches/toolsets.ts
subagentModels: adds error logging for missing patch patterns (Plan, Explore, general agents). toolsets: extends writeToolsets signature with optional planModeToolset parameter; adds mode-change toolset switching logic with error handling for setState injection and toolset updates.
Patch Table Format
src/patches/tableFormat.ts
Formatting change only: reformats TABLE_BORDERS_ASCII_SPACED constant from multi-line layout to single-line continuation; no functional or logic changes.
Result Display & CLI Output
src/index.tsx
Adds printPatchResults utility function to group and display patch results by PatchGroup, filtering via isShowUnchanged flag; integrates into non-interactive apply flow to extract and display results after applyCustomization execution.
UI Integration
src/ui/App.tsx
Updates applyCustomization callback to accept ApplyCustomizationResult type; accesses config from result.config instead of direct newConfig parameter.
Changelog
CHANGELOG.md
Documents redesign of --apply output feature.

Sequence Diagram

sequenceDiagram
    participant CLI as CLI/App
    participant applyC as applyCustomization()
    participant patches as applyPatches()
    participant patch as Patch Execution
    participant result as Results Aggregator
    participant display as printPatchResults()

    CLI->>applyC: invoke with config
    applyC->>applyC: precompute common values
    applyC->>patches: call with patches array
    
    loop For each patch
        patches->>patch: execute patch function
        patch-->>result: record PatchResult<br/>(id, name, group, applied, details)
        result->>result: accumulate results
    end
    
    patches-->>applyC: return all results
    applyC->>applyC: update config with patches
    applyC-->>CLI: return ApplyCustomizationResult<br/>(config + results)
    
    CLI->>display: call printPatchResults(results)
    display->>display: group by PatchGroup
    display->>display: filter by isShowUnchanged
    display-->>CLI: render patch outcome
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 Patches once scattered, now unified and bright,
Results grouped neatly, displayed just right!
From function to function, the flow's redesigned,
Patch outcomes revealed—no details left behind! ✨

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

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.

1 participant