Repository navigation
refactor: split oversized modules and enforce anti-slop lint - #343
Merged
Merged
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split payload bounding and retention by responsibility, preserve delimiters as source escapes, and retain tool updates with one completion lookup per identity. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…ilities Keep the existing module entry points, share the session settlement rule, and extract projection test cases and fixtures by behavior. Remove attachment materialization effects that only return decoded attachments. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…d modules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The memory approval reuses the composer's surface constant, the docked approval and question panels share one shape constant, the approval dot uses bg-warning, attachment tiles use border-border, and the channel warning label uses text-warning-foreground. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useBotThreadRuntime and useGroupThreadRuntime carried identical threadTitle, readFileAsDataUrl, and attachment-reading code. Both now import them from threadRuntimeAttachments.ts, which has focused tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…runtimes useThreadPendingUserInput owns the answer drafts, question index, and responding request ids both runtime hooks carried in duplicate. groupModelSelection moves to groupThreadModel.logic.ts. Bot and group send lifecycles stay separate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e logic tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w out of BotThreadLanding useBotLandingTimeline owns routine run paging, receipt projection, delegations, and the merged timeline order. RoutineReceiptRow gets its own module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…modules BotSettingsForm owns the draft, save bar, and sheets. BotIdentityFields and BotEngineFields render the Identity and Model & usage sections from the draft. Source-contract tests read all four modules, and the shallow render tests expand the section leaves through a shared test-support helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move snapshot history and lookup coverage into independent suites with shared fixtures. Keep command, telemetry, transaction, and restart engine coverage separate. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…utton variants Adds avatar-edit, avatar-tile, default-muted-disabled, ghost-destructive, and outline-pill-muted variants plus an avatar size to ui/button, carrying the classes the call sites passed. The bot settings avatar action and new-bot shape tiles become Buttons; aria-pressed drives the tile's chosen state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto ui/sheet SheetHeader, SheetTitle, and SheetPanel gain a compact variant carrying the classes BotSideSheet passed, and EmptyTitle gains a body variant for its sans medium title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The BotSettingsPage split moved BotModelPicker and TraitsPicker into BotEngineFields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lity out of BotChatMessageRows BotChatMessageRows keeps the memoized assistant and user rows and re-exports the moved symbols. BotMessageAttachments uses the exact scale values for its arbitrary sizes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep bot settings and compatibility coverage at the existing test entry point and extract ownership cases with reusable fixtures. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…est fixtures Compose reactor services from owned state and focused delivery, ingestion, checkpoint, and recovery helpers. Decode typed fixture events at publication, subscribe before triggers, and await observations or receipts instead of polling. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Run owned-path lint autofixes and formatting. The diff is empty with git diff --ignore-all-space --ignore-blank-lines; all changes are whitespace-only. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
… modules DesktopOnboarding.tsx keeps gating, draft recovery, and the durable handoff resume; the subscription and identity steps and the overlay surface move to their own files. desktopOnboarding.logic.ts and goalPlan.logic.ts split into draft, engine, handoff, data, and classification modules with re-exports at the old paths, and the translator moves to a leaf to break the import cycle. Also uses success tokens for the connected check, a Button onboarding size for the tall rounded actions, classes instead of inline pointer-events, and exact scale values for the overlay width and z-index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VoiceCallProvider keeps connection, microphone, and teardown ownership at VoiceCall.tsx, which re-exports the moved helpers, hooks, and views so its importers and module mocks are unchanged. The hang-up button selects a new icon-sm-round Button size instead of restyling the primitive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search field, filter bar, page header, and dialog/page directory layout move to PluginDirectoryLayout.tsx, the catalog constants to pluginDirectoryCatalog.ts, and the MCP server draft helpers to mcpServerDraft.logic.ts. PluginsDialog.tsx keeps the environment-bound state owner, the server editor, and both surfaces, and re-exports moved names. Dialog gains directory header/panel variants that carry the catalog padding, including the pt-5! override, and a divided header variant for the border-b rule, so plugin call sites stop restyling the primitives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PluginsCatalog.tsx keeps the directory composition and re-exports the cards (PluginCatalogCards.tsx), Composio results, custom and removed MCP server lists, and the label translator, each now in its own module. Plugin action buttons select new Button pill sizes, the broker badge a quiet Badge variant, and the category picker a dense Select size, carrying the exact classes the call sites used to pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nu modules sidebarContext.tsx owns the provider, contexts, cookie persistence, and keyboard-facing toggle; sidebarRail.tsx owns resize capture and width clamping; sidebarMenu.tsx owns the group, menu, and submenu parts. sidebar.tsx keeps Sidebar, the trigger, inset, and layout slots, and its export list is unchanged, so no importer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed modules toastState.ts owns the shared manager instances and the visible-time registry so every provider reads the same ones. ToastBody.tsx holds the body rendering, ThreadToastVisibleAutoDismiss.tsx the route-scoped visibility and timeout accounting, and AnchoredToasts.tsx the anchored provider. toast.tsx keeps ToastProvider and Toasts and its existing exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI runs scripts/check-public-dependencies.ts before installing dependencies, so importing effect/Schema failed with ERR_MODULE_NOT_FOUND. Parse manifests with Node built-ins only and add a test that guards the import list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test-file override for no-module-mocking matched only .ts and .tsx, so CI lint rejected the vi.mock seams in apps/desktop/scripts/dev-electron.test.mjs. Also format ResponseLoadingState.test.tsx, which failed fmt:check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…old labels Restoring main's English work-fold labels removed the translated messages from thread-turn-fold-row.tsx, but the coverage snapshot still counted them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The engine commits a queued command even after its caller stops waiting, so an interrupted bootstrap could delete a thread whose first turn was accepted, or miss deleting a thread whose create had committed. Create and turn start now await their results uninterruptibly and record them before cleanup reads them. The latest user message lookup now runs as one ordered SQL query instead of loading every message, image reads gain multi-chunk coverage, and the usage loading comment matches the static skeleton. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude turns select the 1M context variant and grok-build resolves to grok-4.6 before reaching Mastra, so comparing switches against the raw model slug failed for both providers on main as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptile apex |
Bootstrap awaits its create and turn start uninterruptibly, so a command stuck in the engine queue could hold a cancelled request and server shutdown forever. Closing the engine now interrupts the in-flight and queued results, releases their turn admissions, and fails later dispatches instead of leaving them waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cleanup after a failed dispatch also ran when the client cancelled, but the engine commits a queued turn start after its caller leaves, so the message kept pointing at deleted files. Turn starts with pending uploads now await the engine outcome and delete claimed files only when the command receipt shows the turn was not accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…connection modules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker could be interrupted after taking a command but before it installed settlement and admission release, leaving the caller waiting. Take uninterruptibly and install both before processing becomes interruptible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lled engine The dispatch ran uninterruptibly so its receipt could decide upload cleanup, which made a cancelled caller wait behind any stalled command. Run the dispatch detached with its cleanup attached and join it interruptibly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…slop-cleanup # Conflicts: # apps/web/src/components/sidebar/ExperimentalSidebar.tsx
The PickPreload split moved overlay class names into sibling modules, so the generator dropped them on rebuild. Scan all preview sources instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
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.
Problem
The codebase had grown 158 TypeScript files past 800 lines, hundreds of rule-evading escapes (431
as unknown as, 291@effect-diagnosticsdirectives, 32@ts-*directives, 27 lint disables), and no lint guard to stop new slop or raw palette colors from coming back.What changed
max-lineslint rule, which counts code lines. The two generated protocol schemas are untouched.as unknown as, 0@ts-*directives and 0@effect-diagnosticsdirectives remain in source. The few remaining lint-disable hits are generated files (routeTree.gen.ts,mockServiceWorker.js) and the suppression scanner's own pattern.Path,FileSystemandClockinstead of ambient APIs, and moved shared work-log and usage parsing intoclient-runtimefor web and mobile.oxlint-plugin-anti-slop, added shadcn lint and an Akeru plugin (no raw palette strings, no lint suppressions, no module mocking), and made the satisfied rules errors.scripts/check-lint-suppressions.tsruns in CI.AGENTS.mdanddocs/internals/lint.md.About 250k of the added and removed lines are moved code (the same line deleted in one file and added in another). The genuinely new or changed content is roughly 67k added and 24k removed, mostly import headers in split files, tests, and the vendored lint plugin.
Behavior changes included
These are real fixes rather than mechanical cleanup. Each has a focused test and its own changeset:
SafeIntegers.Review
The branch went through several rounds of independent per-slice review (27 slices, then a second pass on the approved ones, then re-reviews of every fix commit) until each reviewer approved. Restoring lost behavior covered null handling in bot tool inputs, markdown prop forwarding on mobile, the
Alertfragment crash, skeleton, shimmer and splash animations, thread ordering by parsed time, and eight default-theme color drifts.For local review,
git diff --color-moved=dimmed-zebra origin/main...separates moved code from changed code.Verification
tsgoreports 0 errors and 0 Effect diagnostics for server, web, desktop, contracts, shared and client-runtime. Mobile reports the same 33 route-typing errors that exist onmain.scripts/check-lint-suppressions.tspasses, and lint and format are clean on touched files.Not covered
orchestrationEngine.integration.test.tsfail onmainas well and are unchanged here.Created with Claude Opus 5.5 and GPT-6.1 Sol in Claude Code.
🤖 Generated with Claude Code