Simplify three duplication hotspots - #2006
Merged
Aaronontheweb merged 1 commit intoAug 19, 2026
Merged
Conversation
Aaronontheweb
force-pushed
the
refactor/simplify-hotspots
branch
from
August 19, 2026 02:08
97fa3c1 to
1efc3ee
Compare
Aaronontheweb
marked this pull request as ready for review
August 19, 2026 02:09
Aaronontheweb
force-pushed
the
refactor/simplify-hotspots
branch
from
August 19, 2026 02:52
1efc3ee to
582950a
Compare
Aaronontheweb
force-pushed
the
refactor/simplify-hotspots
branch
from
August 19, 2026 03:39
582950a to
1efc3ee
Compare
- SQLiteMemoryStore: the inline and checkpoint curation batch writers ran the same per-operation loop. One shared ApplyCurationOperationsAsync now serves both; the checkpoint variant keeps its status update before commit. SQL text, parameters, and transaction boundaries are unchanged. - TUI tests: seven page-test fixtures repeated the same headless Termina setup. One HeadlessTerminaFixture.Create helper replaces them (closes the duplication issue #929 describes). The three multi-route fixtures stay as they are. - Program.cs: seventeen mode handlers repeated the same four-line quiet host-builder setup. One CreateQuietHostBuilder helper replaces them. The chat/sessions WebApplication builder is a different builder type and stays separate. Net: -322 lines. No behavior change.
Aaronontheweb
force-pushed
the
refactor/simplify-hotspots
branch
from
August 19, 2026 12:26
1efc3ee to
780ae9c
Compare
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.
What
Phase 5 of the code-reduction stack (on top of #2005). Three within-file duplication hotspots, −322 net lines, zero behavior change:
SQLiteMemoryStore—ApplyInlineCurationBatchAsyncandApplyCurationBatchAsyncran the same ~190-line per-operation loop (anchor resolution, record insert, dedup lookup, document + FTS upsert) word-for-word. One sharedApplyCurationOperationsAsyncnow serves both; the checkpoint variant keeps itsstatus='completed'update before commit. SQL text, parameter names, public signatures, and transaction boundaries unchanged.HeadlessTerminaFixture.Create<TPage,TVm>helper replaces them, with per-site page/VM lambdas and dimensions preserved. The three multi-route fixtures (Sessions/Chat/InitExistingInstall) intentionally stay as-is.Program.cs— seventeen mode handlers repeated the same 4-line quiet host-builder setup; oneCreateQuietHostBuilderhelper replaces them. The chat/sessions path usesWebApplication.CreateBuilder(hosts a SignalR endpoint) — different builder type, deliberately not converted, documented on the helper.Verification
Netclaw.Cli.Tests(1,370), fullNetclaw.Actors.Tests(3,447) — all greendotnet slopwatch analyze: 0 issues; headers verified; zero build warningsStack
PR 5. Base:
refactor/binding-engine(#2005).