d-oit/do-epub-studio·#884· merged

fix(config): add general agent, differentiate model tiers; feat(wave6): dead code cleanup

Analysed against 68cde46310 files changedby d-oit
Open PR on GitHub

Change-risk score

8.6out of 10Elevated
Repository health
7.1to7.4base against this head

This change sits in the top third of this repository's own risk distribution, the band worth reviewing closely. It is riskier than 79% of this repository's own commits.

No changed file lost health in this diff. 2 contracts changed, called by 14 symbols in files this PR does not touch.

Files changed
10
in this diff
Contracts changed
2
removed or signature
Outside callers
14
not in this diff
Findings added
5
2 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

.agentsappsdocspackagesplansscriptsskillswebworkerreader-coreschemashareduiarchiveagent-browserdo-web-doc-reso…github-…srcsrcsrcsrcsrcsrcscripts__tests__componentsfeaturesi18nlib__tests__routes__tests____tests____storie…__tests__
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 1,005 of 1,037 files at a readable size, grouped by directory and sized by lines of code. 10 changed here reach 35 more by import. 32 are too small to see at this width, which is what the frame below is for.

Inside apps/web/src

__tests__featuresi18nlibadminauthreaderofflinecomponentscomponentshooksannotationssearchtoolbaradm…admin-rec…annotation-…api.te…br…cat…data…draw…expo…gran…info…li…lo…main.t…no…offli…offli…offli…offlin…perform…pr…reader…reader…securi…sett…sid…storage-q…st…use-…useI…us…us…us…St…Virtu…us…us…ar.tsde.tsen.tses.tsfr.tshi.tsit.tsja.tsko.tsnl.tspt.tsru.tszh.tsauth.…pre…reade…Er…Adm…Ad…Aud…BooksPag…BooksPa…Gra…Login…LoginPage…an…in…conf…conf…cry…db.…readi…sync.…Mo…Bo…Bo…Gr…Grant…Grant…useAnn…useEx…useExp…useR…us…use…useRead…useRe…useRe…useR…us…Annotat…Annotat…Co…Co…Co…Co…Comm…Comme…Highl…Book…Book…Info…Noti…Se…Sear…Table…Table…Fi…Fi…Re…Reade…ReaderTool…

224 files, 10 changed by this PR and 24 that import one. Click any directory above to frame it instead.

Changed

Contracts this PR changes

Only symbols that were removed or had their signature changed. An added symbol has no prior callers, and a body-only change leaves the caller's contract intact, so neither is a finding.

apiRequestremovedapps/web/src/lib/api/index.ts:60

13 callers outside this PR, 6 inside it.

apps/web/src/__tests__/api.test.ts::__module__apps/web/src/features/admin/AdminRecoverPage.tsx::AdminRecoverPageapps/web/src/features/admin/BooksPage.tsx::AdminBookResponsesPageapps/web/src/features/admin/GrantsPage.tsx::GrantsViewapps/web/src/features/auth/LoginPage.tsx::LoginPageapps/web/src/features/reader/ReaderPage.tsx::ReaderPageapps/web/src/features/reader/hooks/useEpubProgress.ts::createRelocatedHandlerapps/web/src/features/reader/hooks/useReaderDataLoader.ts::useReaderDataLoaderapps/web/src/features/reader/hooks/useReadingTimer.ts::useReadingTimerapps/web/src/lib/data-cache.ts::fetchAdminBooksapps/web/src/lib/data-cache.ts::fetchAuditLogsapps/web/src/lib/data-cache.ts::fetchCatalogBooksapps/web/src/lib/data-cache.ts::fetchGrantsForBook
getApiUrlremovedapps/web/src/lib/api/index.ts:261

1 caller outside this PR.

apps/web/src/__tests__/api.test.ts::__module__

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (5)
  • highnested complexity
    apps/web/src/lib/api/core.ts:42

    apiRequest nests 5 levels deep

  • highcomplex method
    apps/web/src/lib/api/core.ts:42

    apiRequest has cyclomatic complexity 19

  • mediumio in loop
    apps/web/src/lib/api/core.ts:78

    a network call runs once per loop iteration (N+1 / IO-in-loop)

  • lowlarge method
    apps/web/src/lib/api/core.ts:42

    apiRequest is 76 lines long

  • lowserial await in loop
    apps/web/src/lib/api/core.ts:78

    a network call is awaited serially in a loop; if the iterations are independent, fan out with gather / Promise.all

Resolved (2)
  • duplicated assertion block
    apps/web/src/__tests__/notes-roundtrip.test.ts
  • dry violation
    apps/web/src/components/ui/index.tsx

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • apps/worker/src/routes/search.tsDominik Oswald 100% of 1 commits
  • apps/web/src/lib/api/annotations.tsDominik Oswald 89% of 1 commits
  • apps/web/src/lib/api/index.tsd-oit 59% of 3 commits
  • apps/web/src/__tests__/api-annotations.test.tsd-oit 100% of 1 commits
  • apps/worker/src/audit/index.tsDominik Oswald 100% of 5 commits

Tests that cover this change

Test files that import a file this PR changes. Not a coverage measurement: it is the import graph, so it says which tests are worth running, not which lines they reach.

  • apps/web/src/features/reader/ReaderPage.test.tsx
  • apps/web/src/__tests__/main.test.tsx
  • apps/web/src/__tests__/reader-hooks.test.ts
  • apps/web/src/features/reader/ReaderPage.progress.test.tsx
  • apps/web/src/__tests__/admin-dashboard-page.test.tsx
  • apps/web/src/__tests__/admin-recover-page.test.tsx
  • apps/web/src/__tests__/api.test.ts
  • apps/worker/src/__tests__/audit.test.ts
  • apps/worker/src/audit/__tests__/redaction.test.ts
  • apps/worker/src/__tests__/edge-cache.test.ts
  • apps/worker/src/__tests__/middleware.test.ts
  • apps/worker/src/__tests__/routes.bookmarks.test.ts
  • apps/worker/src/__tests__/routes.insights.test.ts
  • apps/web/src/components/ui/__tests__/Input.test.tsx
  • apps/web/src/components/ui/__tests__/Modal.test.tsx
  • apps/web/src/components/ui/__tests__/Tooltip.test.tsx
  • apps/worker/src/__tests__/cors.test.ts
  • apps/worker/src/__tests__/recovery.test.ts
  • apps/worker/src/__tests__/admin-middleware.test.ts
  • apps/web/src/__tests__/useImportNotes.test.ts
  • apps/web/src/features/reader/components/search/SearchPanel.test.tsx
  • apps/web/src/features/reader/hooks/useReaderSearch.test.ts
  • apps/web/src/features/reader/hooks/useOptimisticAnnotations.test.ts

7 changed files have no test importing them.

Get this on your own pull requests

This page came from an index of d-oit/do-epub-studio. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.

fix(config): add general agent, differentiate model tiers; feat(wave6): dead code cleanup · d-oit/do-epub-studio #884 · Repowise