chore: dead-code sweep across core classes (plan 014, steps 1-6)#82
Merged
Conversation
action-result.ts: delete uncalled saveBrowserLogs()/saveHtmlOutput(), the now-dead browserLogsContent getter, and the unused Diff.ariaRemoved getter. action.ts: delete uncalled expect(), caputrePageWithScreenshot(), waitForInteraction(), setActor(), getCurrentState() (exact dup of getActionResult()), the unused prevActionResult local and expectation field; drop 6 unused imports. Remove the never-read `experience` param from Action.attempt and Explorer.attemptAction and the dead arg at all call sites (the callers' skip-experience intent was never functional — follow-up). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delete uncalled Explorer methods: ensureActiveTestPageAvailable(), getCurrentUrl(), getConfigPath(), reload(), hasPlaywrightLocator(), and setUserResolve() + the never-read userResolveFn field (drop the forwarding line in explorbot.ts; keep ExplorBot.setUserResolve and App.tsx). Collapse the impossible `!this.config` guards in getConfig()/start() (config is a required ctor param). Drop unused UserResolveFunction/outputPath imports. Also strip the now-dead 3rd attempt() arg from boat/doc-collector call sites (it imports Explorer from src). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delete uncalled getCurrentContext() and getPreviousState(), and loadHtmlFromFile() (a byte-for-byte copy of ActionResult.loadHtmlFromFile). Drop the now-unused tag and outputPath imports and an orphaned JSDoc block. (The knowledge scanner is left untouched — plan 010 removes it and is not yet in main; see report.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
explorbot.ts: delete isReady(), needsInput field, getConfigParser(), the unused agentEmoji local, and the dead captain.setQuartermaster/setHistorian + rerunner.setQuartermaster wiring (captain consumes neither; rerunner consumes only getHistorian). Keep tester's wiring and rerunner.setHistorian. navigator.ts: delete the never-read experienceCompactor field/param/assignment/ import and drop the argument at the explorbot construction site; drop the unused WebPageState import. planner.ts: drop the unused getStyles import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Conversation: delete the write-only id field + generateId(), and the production-unused addUserImage() (the two unit tests that used it now push a non-string message directly, preserving their cleanupTag/hasTag coverage). Provider: make getProviderOptionsForAgent/getReasoningForAgent private (only internal callers), and move CONTEXT_LENGTH_PATTERNS to a module-level const. Skipped (entangled with the still-open plan-007 PR #75, which rewrites clone()/ invokeConversation): Conversation.clone() and Provider.lastConversation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explorbot Self-RegressionCommit
Attempt details
Session analysis — basic (native): Session AnalysisThe Issues list feature was exercised across 5 tests covering creation, search, label filter, status filter, and detail view navigation. All core flows executed successfully: issues can be created and appear in the list with correct count, search filters the table to matching results, label and status dropdowns filter correctly, and clicking a row opens the detail view with full information. Coverage
What works
Execution Issues
|
# Conflicts: # src/ai/conversation.ts
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.
Implements plan 014 (
plans/014-dead-code-sweep.md), Steps 1–6 — deletes provably-unreferenced code from the core classes. 339 deletions, ~30 insertions. No behavioral change: every item was grep-verified callerless before deletion, and the full suite stays green.What's removed
action-result.ts:saveBrowserLogs(),saveHtmlOutput(), the now-deadbrowserLogsContentgetter, unusedDiff.ariaRemoved.action.ts:expect(),caputrePageWithScreenshot(),waitForInteraction(),setActor(),getCurrentState()(exact dup ofgetActionResult()), theexpectationfield +prevActionResultlocal, 6 unused imports; the never-readexperienceparam onAction.attempt/Explorer.attemptAction(dead arg stripped at all call sites, incl.boat/doc-collector).explorer.ts:ensureActiveTestPageAvailable(),getCurrentUrl(),getConfigPath(),reload(),hasPlaywrightLocator(),setUserResolve()+userResolveFn; collapsed the impossible!this.configguards ingetConfig()/start().state-manager.ts:getCurrentContext(),getPreviousState(),loadHtmlFromFile()(byte-for-byte copy ofActionResult's), unusedtag/outputPathimports + orphaned JSDoc.explorbot.ts:isReady(),needsInput,getConfigParser(), unusedagentEmoji; deadcaptain.setQuartermaster/setHistorian+rerunner.setQuartermasterwiring (kept tester's +rerunner.setHistorian).navigator.ts: never-readexperienceCompactordep (field/param/assignment/import) + the construction arg; unusedWebPageState.planner.ts: unusedgetStyles.conversation.ts: write-onlyid+generateId(), production-unusedaddUserImage()(2 tests reworked to push a non-string message directly — same coverage).provider.ts:getProviderOptionsForAgent/getReasoningForAgent→private;CONTEXT_LENGTH_PATTERNS→ module const.Verification
bun test tests/unit→ 755 pass, 0 fail;bun run lintclean;bunx tsc --noEmit→ 723 ≤ 724 baseline;bun test tests/integration/planner.test.ts→ 11 pass.experience-param removal and guard collapses confirmed behavior-neutral.Scope notes
Conversation.clone()andProvider.lastConversation— they entangle with the still-open PR fix: unify tool-success mapping and honor telemetryFunctionId (plan 007) #75 (plan 007), which rewritesclone()/invokeConversation. Heads-up: plans 007/009/010 (fix: unify tool-success mapping and honor telemetryFunctionId (plan 007) #75/fix: honor --incognito by disabling the experience tracker (plan 009) #78/refactor: delegate StateManager knowledge loading to KnowledgeTracker (plan 010) #79) are not actually inmain(stacked PRs merged into their bases, notmain), so a couple of plan-014 items are deferred until those land.ExplorBot.setUserResolve/userResolveFn/App.tsxkept intact (the TUI channel is now write-only pending a maintainer decision, per the plan).🤖 Generated with Claude Code