docs/plans/2026-03-24-coverage-priority-map-testing-review-full-repo.md
bun test --coverage --coverage-reporter=lcov --coverage-dir=.coverage-repo-2026-03-24l --reporter=dots2956 pass, 0 fail, 592 files, 3.56s.pnpm test:profile -- --top 25: clean. Nothing breached the fast-lane budget.pnpm test:slowest -- --top 25: clean. Nothing breached the fast-lane budget.packages/**/src/**.package_score is the sum of the top 5 remaining file scores in that package. It is a rough map, not gospel.Non-React is done. The next honest phase is React and state-heavy seams.
Do not do another package sweep. The remaining value is split across selection, ai, link, toggle, table, toc, emoji, and a few secondary packages.
The locked next phase is simple:
score >= 9 file.score = 8 file.score = 10: 16 filesscore >= 9: 40 filesscore >= 8: 63 filesscore >= 7: 84 filesscore >= 6: 131 filesscore >= 5: 167 filesRaw package order from the fresh scoring:
ai — package score 50, top files applyAISuggestions.ts:10; submitAIChat.ts:10; callCompletionApi.ts:10; applyTableCellSuggestion.ts:10; triggerCopilotSuggestion.ts:10selection — package score 50, top files useCursorOverlay.ts:10; useBlockSelectable.ts:10; getSelectionRects.ts:10; getCursorOverlayState.ts:10; getCaretPosition.ts:10toc — package score 46, top files useTocSideBar.ts:10; useContentController.ts:9; useContentObserver.ts:9; useTocObserver.ts:9; useTocController.ts:9emoji — package score 45, top files EmojiFloatingLibrary.ts:10; useEmojiPickerState.ts:9; EmojiFloatingGridBuilder.ts:9; EmojiFloatingGrid.ts:9; useEmojiPicker.ts:8toggle — package score 42, top files getLastEntryEnclosedInToggle.ts:9; isInClosedToggle.ts:9; useToggleToolbarButton.ts:8; useToggleButton.ts:8; findElementIdsHiddenInToggle.ts:8link — package score 40, top files triggerFloatingLinkInsert.ts:10; triggerFloatingLinkEdit.ts:9; triggerFloatingLink.ts:9; useFloatingLinkInsert.ts:6; submitFloatingLink.ts:6media — package score 37, top files history.ts:9; usePlaceholderPopover.ts:8; usePlaceholderElement.ts:7; getMediaType.ts:7; insertMedia.ts:6list — package score 36, top files useListToolbarButton.ts:8; useTodoListElement.ts:8; useTodoListToolbarButton.ts:8; toggleList.ts:6; getSiblingList.ts:6list-classic — package score 34, top files useTodoListElement.ts:8; useListToolbarButton.ts:8; moveListItemSublistItemsToListItemSublist.ts:6; getHighestEmptyList.ts:6; moveListItemDown.ts:6table — package score 34, top files useTableMergeState.ts:9; useCellIndices.ts:7; getTableCellBorders.ts:6; deleteRow.ts:6; deleteRowWhenExpanded.ts:6Actual execution order is a bit stricter than the raw package table:
selectionailinktoggletable, media, comboboxtoc, emojicursor, math, list, list-classic, callout, excalidrawReason: raw package totals overrate some hook clusters. The file queue is the real source of truth.
ai — applyAISuggestions.ts — score 10, coverage 0.0%, uncovered 164selection — useCursorOverlay.ts — score 10, coverage 7.9%, uncovered 116ai — submitAIChat.ts — score 10, coverage 0.0%, uncovered 97ai — callCompletionApi.ts — score 10, coverage 0.0%, uncovered 90selection — useBlockSelectable.ts — score 10, coverage 5.8%, uncovered 81emoji — EmojiFloatingLibrary.ts — score 10, coverage 0.0%, uncovered 78selection — getSelectionRects.ts — score 10, coverage 2.7%, uncovered 71ai — applyTableCellSuggestion.ts — score 10, coverage 0.0%, uncovered 41ai — triggerCopilotSuggestion.ts — score 10, coverage 0.0%, uncovered 36link — triggerFloatingLinkInsert.ts — score 10, coverage 0.0%, uncovered 36ai — acceptAISuggestions.ts — score 10, coverage 0.0%, uncovered 31ai — rejectAISuggestions.ts — score 10, coverage 0.0%, uncovered 31ai — resetAIChat.ts — score 10, coverage 0.0%, uncovered 29selection — getCursorOverlayState.ts — score 10, coverage 11.5%, uncovered 23selection — getCaretPosition.ts — score 10, coverage 11.1%, uncovered 16toc and emoji. Those packages have legit hook clusters, but they are not more important than selection, ai, or link.core, slate, and markdown still show medium leftovers, but they are below the current phase threshold. Do not get distracted.