Remove the dead summarizing-text visual-context state#509
Merged
Conversation
The visual-context summarizer was deleted in #499, so the VisualContextStatus.summarizingText state and the matching Summarize debug stage are now unreachable: nothing ever produces them. Remove the status case, the debug stage, and their switch arms so the visual-context state machine and the focus debug overlay only model stages that can actually occur (capture -> OCR -> inject).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The visual-context summarizer was deleted in #499, so
VisualContextStatus.summarizingTextand the matching "Summarize" debug stage are now unreachable — nothing ever produces them. This removes the status case, the debug stage, and their switch arms so the visual-context state machine and the focus debug overlay only model the stages that can actually occur (capture → OCR → inject).Validation
rg 'summarizingText'andrg '\.summarize'across the app and tests return no remaining references.VisualContextModelTests.test_status_detail_returnsNonEmptyStringForEachCaseupdated to drop the removed case from its enumeration; it still asserts every remaining status has a unique, non-empty detail.Linked issues
Refs #499.
Risk / rollout notes
Greptile Summary
This PR removes the
VisualContextStatus.summarizingTextenum case and the matchingVisualContextDebugStage.summarizecase from the developer-only focus debug overlay, following the deletion of the visual-context summarizer service in #499.VisualContextStatusis trimmed from 7 to 6 cases; all switch statements across both changed files remain exhaustive.VisualContextDebugStageshrinks from 4 to 3 pills (Capture → OCR → Inject) in the debug overlay, andstageState(for:)correctly reflects the simplified pipeline.PermissionAndContextModelTestsis updated to drop the removed case from its enumeration, and still asserts every remaining status has a unique, non-empty detail string.Confidence Score: 5/5
Pure dead-code removal with no behaviour change; safe to merge.
Every switch that touched
summarizingTextis now exhaustive over the six remaining cases, and the compiler would have rejected the build otherwise. The test update correctly mirrors the enum change and the uniqueness assertion still exercises every live case. No production logic was altered — only an unreachable state and its developer-debug rendering were deleted.No files require special attention. The stale summarizer-related doc comments in
VisualContextModels.swift(lines 61–62) are pre-existing and out of scope for this PR.Important Files Changed
summarizingTextenum case and itsdetailswitch arm; remaining switch is exhaustive. Stale doc comments referencing the summarizer exist but are outside this PR's scope andmaxSummaryCharactersis still actively used byScreenshotContextGenerator.summarizingTextarms from all four switch statements and dropsVisualContextDebugStage.summarize; all switches remain exhaustive and the stage pill set correctly reflects the three-step capture→OCR→inject pipeline..summarizingTextfrom the manual case list intest_status_detail_returnsNonEmptyStringForEachCase; all remaining cases are still covered and the uniqueness assertion still holds.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A([idle]) --> B([capturing]) B --> C([extractingText]) C --> D([ready]) B --> E([unavailable / failed]) C --> E style A fill:#555,color:#fff style B fill:#b8860b,color:#fff style C fill:#b8860b,color:#fff style D fill:#2d6a2d,color:#fff style E fill:#8b0000,color:#fffReviews (1): Last reviewed commit: "Remove the dead summarizing-text visual-..." | Re-trigger Greptile