Skip to content

feat(studio): implement open issues N1–N7 (search, timeline, mentions, claims, i18n, local LLM, entity types) - #773

Merged
d-oit merged 26 commits into
mainfrom
feat/open-issues-n1-n7-swarm
Sep 12, 2026
Merged

feat(studio): implement open issues N1–N7 (search, timeline, mentions, claims, i18n, local LLM, entity types)#773
d-oit merged 26 commits into
mainfrom
feat/open-issues-n1-n7-swarm

Conversation

@d-oit

@d-oit d-oit commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the seven open issues:

  • N1: Semantic / multilingual search #751 — N1 Semantic search: multilingual embedding search (Xenova/paraphrase-multilingual-MiniLM-L12-v2, 384-d, q8/WASM) with a library toggle and graceful lexical BM25 fallback. Runs on the main thread: the search worker's dynamic import('@huggingface/transformers') never resolves under Turbopack's module-worker bundling (verified dev + production via Playwright traces — worker constructed, zero network, promise hangs forever); the worker semantic path was removed, lexical SEARCH/RESET stays on the worker.
  • N2: Timeline view #752 — N2 Timeline view: chronological entity activity view + app-shell/topbar registration.
  • N3: @mention entity linking in the editor #753 — N3 @mention linking: dks://entity/ mention tokens, inline mention picker, reciprocal backlinks on save (projected on the graph). Fixes react-markdown's urlTransform stripping dks:// URIs.
  • N4: Rule-based claim extraction #754 — N4 Claim extraction: rule-based Assertion: ... (Source: ...) extraction into structured claim rows, with dedupe.
  • N5: i18n-ready string layer #755 — N5 i18n layer: makeT message-module layer covering settings/storage surfaces.
  • N6: Fully-offline local LLM (WebLLM / Transformers.js) #756 — N6 Offline LLM: fully-local local provider (transformers.js, onnx-community/Qwen2.5-0.5B-Instruct, q4) with zero API key, no network.
  • N7: Extensible entity-type plugin system #757 — N7 Entity-type registry: registerEntityType/getEntityTypeMeta replacing the static ENTITY_TYPE_META map; Entity.type widened.

Also: 44x44 touch target for the Radix switch (WCAG 2.5.5).

Fixes #751
Fixes #752
Fixes #753
Fixes #754
Fixes #755
Fixes #756
Fixes #757

Verification

  • pnpm run lint — clean
  • pnpm run typecheck — clean
  • pnpm run test — 2557 passed (166 files)
  • pnpm run build — clean (Turbopack)
  • ./scripts/verify-deps.sh — ALL CHECKS PASSED
  • pnpm run test:e2e — 590 passed, 2 skipped, 0 failed
  • pnpm run test:coverage — 86.13% statements

Note

Rebased onto main after #772 merged; the only conflict was the graph-view.tsx import block (combined #772's GraphEdge/GraphNode type imports with the registry imports).


📝 Summary by GitNexus

Summary

This appears to be a broad Studio frontend feature set spanning search, timeline, mentions, claims, internationalization, local LLM support, and entity types. Despite having no graph dependents, the change is critical in scope because it modifies many files, symbols, and execution flows across the Studio interface.

🔴 CRITICAL blast radius. A large Studio UI change centered on src/components/studio/, reaching 69 affected flows across the Studio and Views areas.

The core impact is concentrated in the Studio application shell and related interaction components, including AppShell, MindMapView, getViewName, currentView, and handleViewError in src/components/studio/app-shell.tsx. Review the view selection and error handling paths first, then the navigation and command interactions in src/components/studio/command-palette.tsx and src/components/studio/mobile-drawer.tsx.

src/components/studio/right-panel.tsx is the hottest changed file, with 15 changed symbols. The PR also alters editor behavior through buildDraft and useEditorDraft in src/components/studio/editor-hooks.tsx, entity rendering through EntityIcon in src/components/studio/entity-type-icon.tsx, and adds end to end coverage under e2e/ for claims, editor mentions, entity types, local LLM, semantic search, and timeline behavior.

The change spans 125 files and 248 symbols, with impact concentrated in the human named Studio and Views modules and smaller touches in Ai, Ui, Search, and Editor. There are no graph dependents or cross-repo consumers, so review attention should stay on internal integration among the changed Studio components and the affected execution flows.

Added by GitNexus for PR #773. Edit freely — this block is replaced on the next review, everything above it is left untouched.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
do-knowledge-studio Error Error Sep 12, 2026 12:50pm UTC

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Blocked merge diagnosis — blocked
⏳ Check run(s) still in progress: ["Codacy Static Code Analysis","Diagnose Blocked Merge State","Detect Changes","YAML Syntax Validation","Infrastructure as Code Security","Shell Script Security Analysis","Trivy Filesystem Security Scan","GitHub Actions Workflow Validation","Secret Detection","commitlint","Analyze (javascript-typescript)","Analyze (actions)","labeler"]

@github-actions github-actions Bot added documentation Documentation improvements config tests Related to automated/manual tests labels Sep 9, 2026
@deepsource-io

deepsource-io Bot commented Sep 9, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 5de1f4a...8acd0fd on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Sep 12, 2026 12:49p.m. Review ↗
Python Sep 12, 2026 12:49p.m. Review ↗
Shell Sep 12, 2026 12:49p.m. Review ↗
SQL Sep 12, 2026 12:49p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
Akon Labs

GitNexus Review · PR #773

12 issues found across 11 files. (reviewed 58, 42 triaged of 100 reviewable files) (3 further findings passed review but were held by the noise budget)

🤖 Agent context — 248 symbols · 125 files

Summary

This appears to be a broad Studio frontend feature set spanning search, timeline, mentions, claims, internationalization, local LLM support, and entity types. Despite having no graph dependents, the change is critical in scope because it modifies many files, symbols, and execution flows across the Studio interface.

🔴 CRITICAL blast radius. A large Studio UI change centered on src/components/studio/, reaching 69 affected flows across the Studio and Views areas.

The core impact is concentrated in the Studio application shell and related interaction components, including AppShell, MindMapView, getViewName, currentView, and handleViewError in src/components/studio/app-shell.tsx. Review the view selection and error handling paths first, then the navigation and command interactions in src/components/studio/command-palette.tsx and src/components/studio/mobile-drawer.tsx.

src/components/studio/right-panel.tsx is the hottest changed file, with 15 changed symbols. The PR also alters editor behavior through buildDraft and useEditorDraft in src/components/studio/editor-hooks.tsx, entity rendering through EntityIcon in src/components/studio/entity-type-icon.tsx, and adds end to end coverage under e2e/ for claims, editor mentions, entity types, local LLM, semantic search, and timeline behavior.

The change spans 125 files and 248 symbols, with impact concentrated in the human named Studio and Views modules and smaller touches in Ai, Ui, Search, and Editor. There are no graph dependents or cross-repo consumers, so review attention should stay on internal integration among the changed Studio components and the affected execution flows.

🔴 CRITICAL blast radius — this change touches 6 modules; this lands on a critical surface, so review the dependents carefully before merging.

Blast Level Dependents Modules Files
🔴 CRITICAL 0 6 125

What changed

Symbol Changes (248)
Kind Symbol Location
Function ChatView src/components/studio/app-shell.test.tsx:41
Const VIEW_NAMES src/components/studio/app-shell.tsx:46
Function MindMapView src/components/studio/app-shell.tsx:21
Function getViewName src/components/studio/app-shell.tsx:60
Function AppShell src/components/studio/app-shell.tsx:65
Function currentView src/components/studio/app-shell.tsx:66
Function handleViewError src/components/studio/app-shell.tsx:74
Interface CmdItem src/components/studio/command-palette.tsx:22
Function CommandPalette src/components/studio/command-palette.tsx:36
Function buildDraft src/components/studio/editor-hooks.tsx:83
Function useEditorDraft src/components/studio/editor-hooks.tsx:107
Interface UseEditorDraftParams src/components/studio/editor-hooks.tsx:43
Function EntityIcon src/components/studio/entity-type-icon.tsx:7
Function MobileDrawer src/components/studio/mobile-drawer.tsx:29
Function onChange src/components/studio/mobile-drawer.tsx:41
Function DrawerHeader src/components/studio/mobile-drawer.tsx:76
Function TabSwitcher src/components/studio/mobile-drawer.tsx:117
Function NavTab src/components/studio/mobile-drawer.tsx:165
Function SearchTab src/components/studio/mobile-drawer.tsx:230
Function DrawerFooter src/components/studio/mobile-drawer.tsx:351
Function toggle src/components/studio/mobile-drawer.tsx:359
Function OfflineIndicator src/components/studio/offline-indicator.tsx:16
Const ANIMATION_VARIANTS src/components/studio/offline-indicator.tsx:7
Function PresenceIndicator src/components/studio/presence-indicator.tsx:10
Function PresenceRow src/components/studio/presence-indicator.tsx:58
Interface PresenceIndicatorProps src/components/studio/presence-indicator.tsx:5
Function QRDisplay src/components/studio/qr-pairing.tsx:8
Function QRScanner src/components/studio/qr-pairing.tsx:45
Function startCamera src/components/studio/qr-pairing.tsx:69
Function RightPanel src/components/studio/right-panel.tsx:12
Function currentView src/components/studio/right-panel.tsx:13
Function rightPanelOpen src/components/studio/right-panel.tsx:14
Function chat src/components/studio/right-panel.tsx:15
Function startNew src/components/studio/right-panel.tsx:16
Function SearchPanel src/components/studio/right-panel.tsx:34
Function searchQuery src/components/studio/right-panel.tsx:35
Function setSearchQuery src/components/studio/right-panel.tsx:36
Function entities src/components/studio/right-panel.tsx:37
Function claims src/components/studio/right-panel.tsx:38
Function startEdit src/components/studio/right-panel.tsx:39
Function entityIndex src/components/studio/right-panel.tsx:42
Function rankedResults src/components/studio/right-panel.tsx:43
Function InspectorPanel src/components/studio/right-panel.tsx:184
Function CitationsPanel src/components/studio/right-panel.tsx:328
Interface ShortcutRow src/components/studio/shortcuts-dialog.tsx:11
Const SHORTCUTS src/components/studio/shortcuts-dialog.tsx:16
Function ShortcutsDialog src/components/studio/shortcuts-dialog.tsx:100
Function ShortcutsTrigger src/components/studio/shortcuts-dialog.tsx:377
Interface NavItem src/components/studio/sidebar.tsx:28
Const NAV_GROUPS src/components/studio/sidebar.tsx:37
Const VIEW_TITLES src/components/studio/topbar.tsx:8
Function Topbar src/components/studio/topbar.tsx:22
Function currentView src/components/studio/topbar.tsx:23
Function searchQuery src/components/studio/topbar.tsx:24
Function startNew src/components/studio/topbar.tsx:25
Function setCommandOpen src/components/studio/topbar.tsx:26
Function setSearchQuery src/components/studio/topbar.tsx:27
Function handleSearchKeyDown src/components/studio/topbar.tsx:39
Function Field src/components/studio/views/ai-harness-settings-panel.test.tsx:40
Function AiHarnessSettingsPanel src/components/studio/views/ai-harness-settings-panel.tsx:50
Function Field src/components/studio/views/ai-harness-settings.tsx:27
Interface ProviderOption src/components/studio/views/ai-harness-settings.tsx:12
Function BackupTips src/components/studio/views/backup-tips.tsx:6
Const mockAddClaim src/components/studio/views/editor-claims-panel.test.tsx:25
Const mockUpdateClaim src/components/studio/views/editor-claims-panel.test.tsx:26
Const mockDeleteClaim src/components/studio/views/editor-claims-panel.test.tsx:27
Const baseClaim src/components/studio/views/editor-claims-panel.test.tsx:29
Function I src/components/studio/views/editor-claims-panel.test.tsx:9
Function VerificationBadge src/components/studio/views/editor-claims-panel.tsx:6
Function ClaimsPanel src/components/studio/views/editor-claims-panel.tsx:30
Function resetForm src/components/studio/views/editor-claims-panel.tsx:50
Function startEdit src/components/studio/views/editor-claims-panel.tsx:59
Function handleSave src/components/studio/views/editor-claims-panel.tsx:68
Function handleDelete src/components/studio/views/editor-claims-panel.tsx:94
Function EditorHeader src/components/studio/views/editor-helpers.tsx:9
Function EditorTags src/components/studio/views/editor-helpers.tsx:60
Const mockFinishEditing src/components/studio/views/editor-view-coverage.test.tsx:116
Function useStudioStore src/components/studio/views/editor-view-coverage.test.tsx:139
Const mockDeleteClaim src/components/studio/views/editor-view.test.tsx:98
Const mockEntities src/components/studio/views/editor-view.test.tsx:100
Function useStudioStore src/components/studio/views/editor-view.test.tsx:118
Const SERIF_FONT_STYLE src/components/studio/views/editor-view.tsx:36
Const ADVANCED_METADATA_TITLE src/components/studio/views/editor-view.tsx:40
Const ADVANCED_METADATA_DESCRIPTION src/components/studio/views/editor-view.tsx:41
Function restoreSelection src/components/studio/views/editor-view.tsx:43
Function EditorView src/components/studio/views/editor-view.tsx:49
Function claims src/components/studio/views/editor-view.tsx:54
Function addClaim src/components/studio/views/editor-view.tsx:55
Function updateClaim src/components/studio/views/editor-view.tsx:56
Function deleteClaim src/components/studio/views/editor-view.tsx:57
Function handleChange src/components/studio/views/editor-view.tsx:98
Function wordCount src/components/studio/views/editor-view.tsx:108
Function handleFormat src/components/studio/views/editor-view.tsx:122
Function handleSave src/components/studio/views/editor-view.tsx:155
Function handleDiscard src/components/studio/views/editor-view.tsx:177
Function EncryptExportDialog src/components/studio/views/encrypt-export-dialog.tsx:22
Interface EncryptExportDialogProps src/components/studio/views/encrypt-export-dialog.tsx:9
Function ExportFormatGrid src/components/studio/views/export-format-grid.tsx:19
Interface ExportFormatGridProps src/components/studio/views/export-format-grid.tsx:11
Function ExportView src/components/studio/views/export-view.tsx:15
Function GraphView src/components/studio/views/graph-view.tsx:119
Function formatRelativeTime src/components/studio/views/home-view.tsx:48
Function HomeView src/components/studio/views/home-view.tsx:65
Function setView src/components/studio/views/home-view.tsx:66
Function startNew src/components/studio/views/home-view.tsx:67
Function startEdit src/components/studio/views/home-view.tsx:68
Function entities src/components/studio/views/home-view.tsx:69
Function today src/components/studio/views/home-view.tsx:77
Function recentEntities src/components/studio/views/home-view.tsx:79
Function totalConnections src/components/studio/views/home-view.tsx:87
Function typeEntries src/components/studio/views/home-view.tsx:92
Function handleOpenEntity src/components/studio/views/home-view.tsx:100
Function EmptyState src/components/studio/views/home-view.tsx:289
Function ImportDropzone src/components/studio/views/import-dropzone.tsx:14
Interface ImportDropzoneProps src/components/studio/views/import-dropzone.tsx:7
Function ImportPreviewDialog src/components/studio/views/import-preview-dialog.tsx:16
Interface ImportPreviewDialogProps src/components/studio/views/import-preview-dialog.tsx:9
Function useMeasurableHeight src/components/studio/views/library-entities.tsx:35
Function readBreakpointPx src/components/studio/views/library-entities.tsx:58
Function useColumnCount src/components/studio/views/library-entities.tsx:82
Function useEntityListVirtualizer src/components/studio/views/library-entities.tsx:110
Function EntityGrid src/components/studio/views/library-entities.tsx:138
Function rows src/components/studio/views/library-entities.tsx:154
Function virtualizer src/components/studio/views/library-entities.tsx:155
Function measureRow src/components/studio/views/library-entities.tsx:164
Function GridCard src/components/studio/views/library-entities.tsx:217
Function EntityTable src/components/studio/views/library-entities.tsx:275
Function TableRow src/components/studio/views/library-entities.tsx:344
Const mockEntities src/components/studio/views/library-view.test.tsx:78
Function LibraryView src/components/studio/views/library-view.tsx:53
Function allEntities src/components/studio/views/library-view.tsx:54
Function typeFilter src/components/studio/views/library-view.tsx:55
Function setTypeFilter src/components/studio/views/library-view.tsx:56
Function sortBy src/components/studio/views/library-view.tsx:57
Function setSortBy src/components/studio/views/library-view.tsx:58
Function searchQuery src/components/studio/views/library-view.tsx:63
Function setSearchQuery src/components/studio/views/library-view.tsx:64
Function rightPanelOpen src/components/studio/views/library-view.tsx:65
Function advancedFilteredEntities src/components/studio/views/library-view.tsx:73
Function clearFilters src/components/studio/views/library-view.tsx:94
Function clearAdvancedFilters src/components/studio/views/library-view.tsx:102
Const FILTERS src/components/studio/views/library-view.tsx:25
Const mockDeleteEntity src/components/studio/views/mindmap-view-coverage.test.tsx:56
Function useStudioStore src/components/studio/views/mindmap-view-coverage.test.tsx:110
Function useStudioStore src/components/studio/views/mindmap-view.test.tsx:89
Const mockDeleteEntity src/components/studio/views/mindmap-view.test.tsx:56
Interface TreeNode src/components/studio/views/mindmap-view.tsx:25
Function MindMapView src/components/studio/views/mindmap-view.tsx:39
Function entities src/components/studio/views/mindmap-view.tsx:40
Function deleteEntity src/components/studio/views/mindmap-view.tsx:53
Function addChildToNode src/components/studio/views/mindmap-view.tsx:60
Function renderNode src/components/studio/views/mindmap-view.tsx:217
Function ResetConfirmDialog src/components/studio/views/reset-confirm-dialog.tsx:16
Interface ResetConfirmDialogProps src/components/studio/views/reset-confirm-dialog.tsx:8
Function useSyncProviderEvents src/components/studio/views/sync-view.tsx:57
Function handleStatus src/components/studio/views/sync-view.tsx:75
Function SyncHeader src/components/studio/views/sync-view.tsx:142
Function SyncHistoryCard src/components/studio/views/sync-view.tsx:187
Function OnlineUsersCard src/components/studio/views/sync-view.tsx:215
Function SyncView src/components/studio/views/sync-view.tsx:231
Function handleJoin src/components/studio/views/sync-view.tsx:268
Function handleLeave src/components/studio/views/sync-view.tsx:299
Function handleResync src/components/studio/views/sync-view.tsx:311
Function handleConflictResolve src/components/studio/views/sync-view.tsx:324
Function handleQrScan src/components/studio/views/sync-view.tsx:336
Function MatrixCell src/components/studio/views/triz-matrix-view.tsx:24
Function MatrixTable src/components/studio/views/triz-matrix-view.tsx:118
Function TrizMatrixView src/components/studio/views/triz-matrix-view.tsx:171
Function PrincipleCard src/components/studio/views/triz-results-view.tsx:17
Function ResultsSummaryDescription src/components/studio/views/triz-results-view.tsx:73
Function ResultsSummary src/components/studio/views/triz-results-view.tsx:89
Function ResultsPrinciples src/components/studio/views/triz-results-view.tsx:114
Function ResultsActions src/components/studio/views/triz-results-view.tsx:153
Interface PrincipleCardProps src/components/studio/views/triz-results-view.tsx:8
Function TrizBranding src/components/studio/views/triz-subviews.tsx:27
Function TrizHeaderControls src/components/studio/views/triz-subviews.tsx:54
Function TrizPickView src/components/studio/views/triz-subviews.tsx:140
Function TrizView src/components/studio/views/triz-view.tsx:14
Function handleCopy src/components/studio/views/triz-view.tsx:35
Const mockOnToggleMenu src/components/studio/views/type-selector.test.tsx:29
Const mockOnSelect src/components/studio/views/type-selector.test.tsx:30
Function getTypeMeta src/components/studio/views/type-selector.tsx:11
Function TypeSelector src/components/studio/views/type-selector.tsx:22
Function handleClick src/components/studio/views/type-selector.tsx:38
Const ENTITY_TYPES src/components/studio/views/type-selector.tsx:8
Interface VoiceInputProps src/components/studio/voice-input.tsx:8
Function VoiceInput src/components/studio/voice-input.tsx:17
Function handleClick src/components/studio/voice-input.tsx:54
Function Switch src/components/ui/switch.tsx:8
Const OPENROUTER_ENDPOINT src/lib/ai/providers.ts:10
Interface ChatRequest src/lib/ai/types.ts:90
Interface ChatResult src/lib/ai/types.ts:101
Const OPENROUTER_DEFAULT_MODELS src/lib/ai/types.ts:125
Method constructor src/lib/search/search-worker-client.ts:49
Method initWorkerListeners src/lib/search/search-worker-client.ts:97
Method searchAsync src/lib/search/search-worker-client.ts:127
Function generateTransactionId src/lib/search/search-worker-client.ts:12
Function searchAsync src/lib/search/search-worker-client.ts:188
Class SearchWorkerClient src/lib/search/search-worker-client.ts:45
Interface PendingRequest src/lib/search/search-worker-client.ts:21
Const transactionSequence src/lib/search/search-worker-client.ts:9
Const data src/lib/search/search-worker-client.ts:101
Const testEntities src/lib/search/search-worker.test.ts:5
Const testClaims src/lib/search/search-worker.test.ts:19
Function handleWorkerMessage src/lib/search/search-worker.ts:39
Function migrateProvider src/lib/studio/ai-settings.ts:107
Function getProviderEndpoint src/lib/studio/ai-settings.ts:325
Const LEGACY_OPENROUTER_MODELS src/lib/studio/ai-settings.ts:115
Interface PersistedSlice src/lib/studio/hydration.ts:41
Const validEntity src/lib/studio/schema.test.ts:47
Const EntityTypeSchema src/lib/studio/schema.ts:4
Const VerificationStatusSchema src/lib/studio/schema.ts:7
Const EntitySchema src/lib/studio/schema.ts:10
Const ClaimSchema src/lib/studio/schema.ts:35
Interface StudioState src/lib/studio/store.ts:44
Const SEED_STATE src/lib/studio/store.ts:144
Const useStudioStore src/lib/studio/store.ts:162
Function pushHistory src/lib/studio/store.ts:192
Function commitEntity src/lib/studio/store.ts:235
Function navigateToView src/lib/studio/store.ts:251
Function deleteEntity src/lib/studio/store.ts:255
Function updateClaim src/lib/studio/store.ts:283
Function sendMessage src/lib/studio/store.ts:315
Interface Entity src/lib/studio/types.ts:20
Interface GraphEdge src/lib/studio/types.ts:67
Function makeEntity src/lib/sync/inbound-conflict-coverage.test.ts:5
Function makeClaim src/lib/sync/inbound-conflict-coverage.test.ts:20
Function makeEntity src/lib/sync/inbound.test.ts:9
Function makeClaim src/lib/sync/inbound.test.ts:24
Function fetchOllamaModels src/lib/ai/providers.ts:341
Function sendChatStream src/lib/ai/providers.ts:332
Function sendChat src/lib/ai/providers.ts:326
Function getAdapter src/lib/ai/providers.ts:321
Function consumeNDJSON src/lib/ai/providers.ts:94
Function consumeSSE src/lib/ai/providers.ts:51
Function validateOllamaUrl src/lib/ai/providers.ts:19
Function isAllowedOllamaHost src/lib/ai/providers.ts:15
Const DEFAULT_OLLAMA_BASE_URL src/lib/ai/types.ts:147
Const DEFAULT_MODEL src/lib/ai/types.ts:141
Const OLLAMA_DEFAULT_MODELS src/lib/ai/types.ts:133
Const PROVIDER_LABELS src/lib/ai/types.ts:119
Const OPENROUTER_DEFAULT_TARGETS src/lib/ai/types.ts:84
Const OPENROUTER_MODELS src/lib/ai/types.ts:62
Const OPENROUTER_ROUTERS src/lib/ai/types.ts:22
Const ENTITY_TYPE_META src/lib/studio/types.ts:75
Interface GraphNode src/lib/studio/types.ts:58
Interface ChatMessage src/lib/studio/types.ts:49
Interface Claim src/lib/studio/types.ts:34
Changed Files (125)
File Status
.agents/skills/deepsource/SKILL.md 🟢 added
e2e/claim-extraction.spec.ts 🟢 added
e2e/editor-mentions.spec.ts 🟢 added
e2e/entity-types.spec.ts 🟢 added
e2e/local-llm.spec.ts 🟢 added
e2e/semantic-search.spec.ts 🟢 added
e2e/timeline.spec.ts 🟢 added
package.json 🟡 modified
plans/135-n3-editor-mentions-2026-09-08.md 🟢 added
plans/135-n6-offline-llm.md 🟢 added
plans/135-n7-entity-types.md 🟢 added
plans/135-open-issues-n1-n7-swarm-2026-09-08.md 🟢 added
plans/136-open-issues-n1-n7-execution-2026-09-09.md 🟢 added
plans/137-pr-sweep-773-778-roast-and-merge-2026-09-12.md 🟢 added
pnpm-lock.yaml 🟡 modified
skills-lock.json 🟢 added
src/components/studio/__tests__/keyboard-nav.test.tsx 🟡 modified
src/components/studio/app-shell.test.tsx 🟡 modified
src/components/studio/app-shell.tsx 🟡 modified
src/components/studio/command-palette.tsx 🟡 modified
src/components/studio/editor-hooks.tsx 🟡 modified
src/components/studio/entity-type-icon.test.tsx 🟢 added
src/components/studio/entity-type-icon.tsx 🟡 modified
src/components/studio/mobile-drawer.tsx 🟡 modified
src/components/studio/offline-indicator.tsx 🟡 modified
src/components/studio/presence-indicator.tsx 🟡 modified
src/components/studio/qr-pairing.tsx 🟡 modified
src/components/studio/right-panel.tsx 🟡 modified
src/components/studio/shortcuts-dialog.tsx 🟡 modified
src/components/studio/sidebar.test.tsx 🟡 modified
src/components/studio/sidebar.tsx 🟡 modified
src/components/studio/topbar.tsx 🟡 modified
src/components/studio/views/ai-harness-settings-panel.test.tsx 🟡 modified
src/components/studio/views/ai-harness-settings-panel.tsx 🟡 modified
src/components/studio/views/ai-harness-settings.test.tsx 🟡 modified
src/components/studio/views/ai-harness-settings.tsx 🟡 modified
src/components/studio/views/ai-harness-view-coverage.test.tsx 🟡 modified
src/components/studio/views/ai-harness-view.test.tsx 🟡 modified
src/components/studio/views/backup-tips.tsx 🟡 modified
src/components/studio/views/editor-claims-panel.test.tsx 🟡 modified
src/components/studio/views/editor-claims-panel.tsx 🟡 modified
src/components/studio/views/editor-helpers.tsx 🟡 modified
src/components/studio/views/editor-mention-picker.test.tsx 🟢 added
src/components/studio/views/editor-mention-picker.tsx 🟢 added
src/components/studio/views/editor-view-coverage.test.tsx 🟡 modified
src/components/studio/views/editor-view.test.tsx 🟡 modified
src/components/studio/views/editor-view.tsx 🟡 modified
src/components/studio/views/encrypt-export-dialog.tsx 🟡 modified
src/components/studio/views/export-format-grid.tsx 🟡 modified
src/components/studio/views/export-view.tsx 🟡 modified
src/components/studio/views/graph-view.tsx 🟡 modified
src/components/studio/views/home-view.tsx 🟡 modified
src/components/studio/views/import-dropzone.tsx 🟡 modified
src/components/studio/views/import-preview-dialog.tsx 🟡 modified
src/components/studio/views/library-entities.tsx 🟡 modified
src/components/studio/views/library-view.test.tsx 🟡 modified
src/components/studio/views/library-view.tsx 🟡 modified
src/components/studio/views/mindmap-view-coverage.test.tsx 🟡 modified
src/components/studio/views/mindmap-view.test.tsx 🟡 modified
src/components/studio/views/mindmap-view.tsx 🟡 modified
src/components/studio/views/reset-confirm-dialog.tsx 🟡 modified
src/components/studio/views/semantic-search-toggle.tsx 🟢 added
src/components/studio/views/sync-view.tsx 🟡 modified
src/components/studio/views/timeline-helpers.ts 🟢 added
src/components/studio/views/timeline-view.test.tsx 🟢 added
src/components/studio/views/timeline-view.tsx 🟢 added
src/components/studio/views/triz-matrix-view.tsx 🟡 modified
src/components/studio/views/triz-results-view.tsx 🟡 modified
src/components/studio/views/triz-subviews.tsx 🟡 modified
src/components/studio/views/triz-view.tsx 🟡 modified
src/components/studio/views/type-selector.test.tsx 🟡 modified
src/components/studio/views/type-selector.tsx 🟡 modified
src/components/studio/voice-input.tsx 🟡 modified
src/components/ui/__tests__/switch.test.tsx 🟡 modified
src/components/ui/switch.tsx 🟡 modified
src/lib/ai/index.ts 🟡 modified
src/lib/ai/local-adapter.test.ts 🟢 added
src/lib/ai/local-adapter.ts 🟢 added
src/lib/ai/providers.test.ts 🟡 modified
src/lib/ai/providers.ts 🟡 modified
src/lib/ai/types-coverage.test.ts 🟡 modified
src/lib/ai/types.ts 🟡 modified
src/lib/editor/mention.test.ts 🟢 added
src/lib/editor/mention.ts 🟢 added
src/lib/i18n/messages/ai.ts 🟢 added
src/lib/i18n/messages/claims.ts 🟢 added
src/lib/i18n/messages/entity-types.ts 🟢 added
src/lib/i18n/messages/export.ts 🟢 added
src/lib/i18n/messages/import.ts 🟢 added
src/lib/i18n/messages/mentions.ts 🟢 added
src/lib/i18n/messages/mobile-drawer.ts 🟢 added
src/lib/i18n/messages/palette.ts 🟢 added
src/lib/i18n/messages/presence.ts 🟢 added
src/lib/i18n/messages/qr-pairing.ts 🟢 added
src/lib/i18n/messages/search.ts 🟢 added
src/lib/i18n/messages/shortcuts.ts 🟢 added
src/lib/i18n/messages/sync.ts 🟢 added
src/lib/i18n/messages/timeline.ts 🟢 added
src/lib/i18n/messages/triz.ts 🟢 added
src/lib/i18n/messages/voice-input.ts 🟢 added
src/lib/i18n/t.ts 🟢 added
src/lib/search/embeddings.test.ts 🟢 added
src/lib/search/embeddings.ts 🟢 added
src/lib/search/search-worker-client.ts 🟡 modified
src/lib/search/search-worker.test.ts 🟡 modified
src/lib/search/search-worker.ts 🟡 modified
src/lib/search/vector-store.test.ts 🟢 added
src/lib/search/vector-store.ts 🟢 added
src/lib/studio/ai-settings.test.ts 🟡 modified
src/lib/studio/ai-settings.ts 🟡 modified
src/lib/studio/claim-parser.test.ts 🟢 added
src/lib/studio/claim-parser.ts 🟢 added
src/lib/studio/entity-types.test.ts 🟢 added
src/lib/studio/entity-types.ts 🟢 added
src/lib/studio/hydration.test.ts 🟡 modified
src/lib/studio/hydration.ts 🟡 modified
src/lib/studio/schema.test-d.ts 🟡 modified
src/lib/studio/schema.test.ts 🟡 modified
src/lib/studio/schema.ts 🟡 modified
src/lib/studio/store-coverage.test.ts 🟡 modified
src/lib/studio/store.test.ts 🟡 modified
src/lib/studio/store.ts 🟡 modified
src/lib/studio/types.ts 🟡 modified
src/lib/sync/inbound-conflict-coverage.test.ts 🟡 modified
src/lib/sync/inbound.test.ts 🟡 modified

What it affects

Architecture Impact

Module Hits Direct
Studio 30
Views 21
Ai 1
Ui 1
Search 1
Editor 1

What to check

File Risk (9)
File Risk Category
.agents/skills/deepsource/SKILL.md 🟢 LOW Documentation
package.json 🟡 MEDIUM Dependencies
plans/135-n3-editor-mentions-2026-09-08.md 🟢 LOW Documentation
plans/135-n6-offline-llm.md 🟢 LOW Documentation
plans/135-n7-entity-types.md 🟢 LOW Documentation
plans/135-open-issues-n1-n7-swarm-2026-09-08.md 🟢 LOW Documentation
plans/136-open-issues-n1-n7-execution-2026-09-09.md 🟢 LOW Documentation
plans/137-pr-sweep-773-778-roast-and-merge-2026-09-12.md 🟢 LOW Documentation
pnpm-lock.yaml 🟢 LOW Lock File

🔀 Structural changes · feat/open-issues-n1-n7-swarmmain

Both branches are separately indexed, so this compares their code graphs directly — what the diff cannot show.

Symbols added (290)

  • src/components/studio/app-shell.test.tsx::TimelineView
  • src/components/studio/app-shell.tsx::ViewRouter
  • src/components/studio/app-shell.tsx::viewEntry
  • src/components/studio/entity-type-icon.test.tsx::I
  • src/components/studio/entity-type-icon.test.tsx::Icon
  • src/components/studio/mobile-drawer.tsx::rankedToEntities
  • src/components/studio/right-panel.tsx::ConnectionList
  • src/components/studio/right-panel.tsx::KeywordResultList
  • src/components/studio/right-panel.tsx::RankedResultList
  • src/components/studio/right-panel.tsx::RankedResultRow
  • src/components/studio/right-panel.tsx::RankedRowMetaBadge
  • src/components/studio/right-panel.tsx::SearchEmptyState
  • …and 278 more

Symbols removed (4)

  • src/components/studio/views/editor-view.tsx::commitEntity
  • src/components/studio/views/mindmap-view.tsx::commitEntity
  • src/components/studio/views/type-selector.tsx::getTypeMeta
  • src/lib/search/search-worker-client.ts::onAbort
Prompt for AI agents (12 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.

<file name="src/lib/studio/schema.ts">

<violation number="1" location="src/lib/studio/schema.ts:28">
P2: Reserve the 'all' filter sentinel from custom registrations — 'StoredEntityTypeSchema' rejects 'all', but the PR's registry accepts it: 'EntityTypeDefSchema' permits every nonblank ≤64-character id (src/lib/studio/entity-types.ts:25-36), and 'getEntityTypeDefs()' exposes every registration (lines 95-98). 'TypeSelector' renders those definitions and passes 'def.id' directly to its selection callback (src/components/studio/views/type-selector.tsx:75-84). Thus a plugin can offer 'all' as an entity type even though its selected entity will later fail persisted-state/import validation.
</violation>

</file>

<file name="src/components/studio/views/library-view.tsx">

<violation number="1" location="src/components/studio/views/library-view.tsx:100">
P2: Retrieve enough ranked documents to fill the entity result cap — 'vector-store.ts' builds one searchable document for every entity and every claim (lines 66-88), and 'semanticSearch' applies its 'limit' to those documents (line 379). This call requests only 100 documents, but 'resolveSemanticEntities' subsequently collapses claim hits to their parent entity (library-view.tsx lines 160-165). Thus, if the highest-ranked 100 documents are claims attached to one entity, the library renders just that entity and omits other relevant entities even though the stated cap is 100 entities.
</violation>

</file>

<file name="src/lib/studio/types.ts">

<violation number="1" location="src/lib/studio/types.ts:22">
P1: Add timeline to the persisted-view validator — 'ViewId' now permits 'timeline', but 'PersistedEnvelopeSchema' still enumerates only the prior views at 'src/lib/studio/schema.ts:172-174'. Hydration validates the complete persisted envelope ('src/lib/studio/hydration.ts:95-110') and rejects it when this field fails validation, rather than falling back just the view.
</violation>

</file>

<file name="src/lib/ai/local-adapter.ts">

<violation number="1" location="src/lib/ai/local-adapter.ts:229">
P1: Emit the fallback response through the stream callback — When transformers.js produces a final chat result without invoking the streamer callback, this branch returns 'full' but never calls 'onChunk'. The streaming UI initializes an empty assistant message and only updates it in its 'sendChatStream' callback; it discards the returned 'ChatResult' (src/components/studio/views/use-ai-harness-chat.ts:115-139). Thus a successful local response is left blank in the UI. This would not be a defect only if every stream consumer rendered the returned result after awaiting, but the active harness consumer does not.
</violation>

</file>

<file name="src/lib/editor/mention.ts">

<violation number="1" location="src/lib/editor/mention.ts:30">
P2: Do not extract mention syntax that Markdown renders as literal code/text — The regex searches raw text without accounting for Markdown context, so it matches '\[@​Alice](dks://entity/e1)' and ' '[@​Alice](dks://entity/e1)' ' even though neither is an inline Markdown link. 'extractMentionLinks' consumes this matcher at lines 211-218, and therefore writes 'mentions'/'mentioned-in' edges for text the author escaped or put in a code example, contradicting the stated final-content link derivation contract.
</violation>

</file>

<file name="src/lib/search/vector-store.ts">

<violation number="1" location="src/lib/search/vector-store.ts:205">
P1: Invalidate the cached corpus when a replacement build fails — After a successful build for corpus A, a build for corpus B clears 'defaultVectorStore' here but leaves 'lastIndexedEntities'/'lastIndexedClaims' pointing at A (they are assigned only on the success path at lines 246–247). A later search using A's original array references takes the cached fast path at lines 285–286 despite the store being empty, and therefore returns an empty 'source: 'semantic'' result instead of rebuilding or falling back. This would not be a defect only if a failed replacement build could not follow a successful build, or if another path invalidated the cached references; 
</violation>

</file>

<file name="src/lib/studio/entity-types.ts">

<violation number="1" location="src/lib/studio/entity-types.ts:69">
P2: Runtime type styling classes are never made available to Tailwind — The registry accepts arbitrary 'bg', 'text', and 'dot' class strings from a runtime registration, but the production stylesheet only imports Tailwind ('src/app/globals.css:1') and contains neither an '@​source'/safelist nor generated rules for plugin-provided candidates. Tailwind determines utility CSS during the build, before 'registerEntityType' runs, so a plugin registering a class absent from the scanned application sources will render its type with no corresponding styles. This would not be a defect only if every plugin were restricted to already-compiled classes or shipped its own CSS; t
</violation>

<violation number="2" location="src/lib/studio/entity-types.ts:126">
P2: Registering after mount does not update any rendered type lists or metadata — 'registerEntityType' mutates only a module-local 'Map'; it neither exposes a subscription nor updates React state. Renderers such as 'TypeSelector' read 'getEntityTypeDefs()' only during their existing render ('src/components/studio/views/type-selector.tsx' diff, new line 42), so a plugin that registers a type after that component is mounted leaves the currently displayed selector/legend/cards unchanged until an unrelated state update happens. This would not be a defect if registration were guaranteed to complete before all relevant components mount, but the documented goal explicitly promises
</violation>

</file>

<file name="src/components/studio/views/type-selector.tsx">

<violation number="1" location="src/components/studio/views/type-selector.tsx:94">
P2: Keep the current unregistered type reachable in the listbox — 'AnyEntityType' includes arbitrary strings, and 'StoredEntityTypeSchema' accepts any nonblank custom type (src/lib/studio/schema.ts:12-31, 37-41). 'EditorView' passes the hydrated entity type straight into this component (src/components/studio/views/editor-view.tsx:82-85, 328-335), while 'getEntityTypeDefs()' only returns registered types (src/lib/studio/entity-types.ts:95-98). Consequently an imported/persisted custom type whose plugin is unavailable has no matching option: every button gets 'tabIndex={-1}' and 'aria-selected=false'. Since the listbox itself is not tabbable, after opening fro
</violation>

</file>

<file name="src/components/studio/right-panel.tsx">

<violation number="1" location="src/components/studio/right-panel.tsx:454">
P3: Remove the unused citation index parameter — After replacing the index-based key with a tuple key, 'i' is no longer referenced anywhere in this callback. This leaves an added dead parameter in the render path.
</violation>

</file>

<file name="src/components/studio/views/timeline-view.tsx">

<violation number="1" location="src/components/studio/views/timeline-view.tsx:154">
P3: Pluralize the month-item label — 'monthItemCount' can return 1 for a month containing one marker, but this call passes only its string value to 'timeline.itemCount'. The message implementation in 'src/lib/i18n/messages/timeline.ts:17' is '${n} items' for every count, so a one-item month is rendered as the grammatically incorrect “1 items.”
</violation>

</file>

<file name="src/components/studio/views/editor-view.tsx">

<violation number="1" location="src/components/studio/views/editor-view.tsx:367">
P3: Do not navigate before preventing the draft unmount flush — 'handleSave' removes 'draftIdRef.current' at line 361, but this new navigation unmounts the editor. 'useEditorDraft' registers an unmount cleanup that always calls 'flushDraft()' (src/components/studio/editor-hooks.tsx:160-173), and 'flushDraft()' rebuilds and saves a draft using that unchanged ref (lines 161-169). Consequently, saving an entity with a mention removes its draft and immediately recreates it during unmount.
</violation>

</file>

Full detail lives in the GitNexus check run for this commit.

@codacy-production

codacy-production Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
ErrorProne 1 medium

View in Codacy

🟢 Metrics 347 complexity · -2 duplication

Metric Results
Complexity 347
Duplication -2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread src/components/studio/right-panel.tsx Outdated
Comment thread src/components/studio/entity-type-icon.tsx Outdated
Comment thread src/lib/search/search-worker-client.ts
Comment thread src/components/studio/views/library-view.tsx Outdated
Comment thread src/lib/studio/types.ts
Comment thread src/components/studio/views/editor-mention-picker.tsx Outdated
Comment thread src/components/studio/views/timeline-helpers.ts Outdated
Comment thread src/lib/search/embeddings.ts Outdated
Comment thread src/lib/search/vector-store.ts Outdated
Comment thread src/lib/studio/claim-parser.ts Outdated
Comment thread src/components/ui/switch.tsx Outdated
Comment thread src/components/studio/views/editor-view.tsx Outdated
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (9acf66e)

The newest push appears focused on the studio UI, updating 15 symbols including Topbar and handleSearchKeyDown in src/components/studio/topbar.tsx, plus editor interactions such as restoreSelection, finishEditing, claims, addClaim, updateClaim, handleChange, and handleFormat in src/components/studio/views/editor-view.tsx. No newly reached modules or risk transition were reported.

The main GitNexus review comment has the full, updated report.

Comment thread src/components/studio/views/editor-view.tsx Outdated
Comment thread src/components/studio/views/timeline-view.tsx Outdated
Comment thread src/lib/i18n/t.ts Outdated
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (a86b789)

This push appears to update studio UI components, with 16 changed symbols including VIEW_TITLES, Topbar, and openMobileSearch in src/components/studio/topbar.tsx, plus editor view functions such as restoreSelection, EditorView, finishEditing, claims, addClaim, updateClaim, and handleChange in src/components/studio/views/editor-view.tsx. No newly reached modules or risk transition are reported.

The main GitNexus review comment has the full, updated report.

Comment thread src/components/studio/topbar.tsx Outdated
Comment thread src/components/studio/topbar.tsx Outdated
Comment thread src/components/studio/topbar.tsx Outdated
Comment thread src/components/studio/views/editor-view.tsx Outdated
@github-actions github-actions Bot added the skills label Sep 9, 2026
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (ac13902)

The newest push appears focused on studio UI search and inspector behavior, with 46 changed symbols including EntityIcon in src/components/studio/entity-type-icon.tsx and SearchPanel, searchQuery, setSearchQuery, entities, claims, startEdit, entityIndex, rankedResults, and InspectorPanel in src/components/studio/right-panel.tsx. It newly reaches the Search and Ai modules, with no risk transition.

The main GitNexus review comment has the full, updated report.

Comment thread src/components/studio/right-panel.tsx
Comment thread src/components/studio/views/library-view.tsx Outdated
Comment thread src/components/studio/views/editor-mention-picker.tsx Outdated
Comment thread src/components/studio/views/timeline-view.tsx Outdated
Comment thread src/lib/editor/mention.ts Outdated
Comment thread src/lib/search/vector-store.ts Outdated
Comment thread src/lib/studio/claim-parser.ts Outdated
Comment thread src/lib/studio/entity-types.ts Outdated
Comment thread src/components/studio/entity-type-icon.tsx Outdated
Comment thread src/lib/studio/claim-parser.ts Outdated
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (70ec3ba)

This push appears to update the studio UI in src/components/studio/right-panel.tsx, with 22 changed functions including SearchPanel, searchQuery, setSearchQuery, entities, claims, startEdit, entityIndex, rankedResults, InspectorPanel, and CitationsPanel. No newly reached modules or risk transition are reported.

The main GitNexus review comment has the full, updated report.

Comment thread src/components/studio/views/library-view.tsx
Comment thread src/components/studio/right-panel.tsx Outdated
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (89a8245)

The newest push appears limited to UI test code, updating ChatView in src/components/studio/app-shell.test.tsx and cn in src/components/studio/sidebar.test.tsx. No newly reached modules or risk transition are reported.

The main GitNexus review comment has the full, updated report.

Comment thread src/lib/studio/schema.ts Outdated
@gitnexus-check

gitnexus-check Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (1903f4a)

The newest push appears to be a UI update focused on src/components/studio/views/library-view.tsx, with 17 changed functions including LibraryView, allEntities, typeFilter, setTypeFilter, sortBy, setSortBy, searchQuery, setSearchQuery, advancedFilteredEntities, and clearFilters. No newly reached modules or risk transition were reported.

The main GitNexus review comment has the full, updated report.

do-ops885 and others added 20 commits September 12, 2026 14:39
app-shell: drop redundant single-child fragments in mock render
sidebar: declare mocks before vi.mock blocks (used-before-defined)
Adopt GitNexus suggestions on PR #773:
- library-view: clear semantic outcome when a new query starts so stale
  results don't linger during the embedder/model warm-up
- schema: EntitySchema.type rejects 'all' (filter sentinel only, never a
  stored entity type)
…5, JS-0116)

GitNexus thread defects (code-level):
- mention: percent-encode parens in link destinations; decode + guard on
  parse so imported ids ending in ')' keep round-tripping (JS-0116 fix
  elsewhere removes async-no-await test noise)
- store: commitEntities batches reciprocal writes into ONE history
  snapshot; single Undo restores source + backlinks together. Used by
  editor save and mindmap child-add (was 2 snapshots, first Undo broke
  the reciprocal-link invariant)
- timeline: orphan claims (no matching entity) no longer navigate to a
  blank editor - startEdit no-ops without an entity
- entity-types: getEntityTypeDefs/registerEntityType return/store copies;
  callers can mutate results without corrupting the cached registry
- entity-type-icon: drop memo - registry updates at runtime, memo pinned
  stale icons; render via createElement to satisfy the linter
- vector-store: catch the discarded finally() chain so an aborted build
  doesn't surface a second unhandled rejection
- claim-parser: dedupe key is a JSON tuple (NUL delimiter could collide
  distinct statements); nested-paren scanLimit confirmed linear
- library-view: semantic failure clears the outcome, falling back to
  lexical entities instead of an empty semantic result list
- editor-mention-picker: re-measure on native textarea scroll - the
  popover kept its pre-scroll position while the editor scrolled
- schema: StoredEntityTypeSchema shared by Entity/GraphNode/MindMapNode
  rejects the 'all' filter sentinel everywhere it is persisted
- right-panel: unique React keys include the index (schema allows
  repeated {targetId, relation} objects)

DeepSource (JS-0105/JS-0362/JS-0358/JS-0400/JS-0246 + JS-0116):
- local-adapter: resolveTarget static
- search-worker-client: wireAbort/searchSemantic static
- embeddings: call-signature type alias; drop redundant ctor
- tests: boolean attrs without value; template literal; de-async
  no-await test fns (JS-0116 bulk)
right-panel: dedupe rendered links and citations (schema permits
repeated {targetId, relation} objects from imports) so payload-only
React keys stay unique without index-based keys (JS-0437).
editor-view.test: de-async the claims-panel visibility test (JS-0116).
local-adapter: resolveLocalTarget is a module function (JS-0105 no
longer flags it as a this-less class method); send/sendStream reference
this.id for the provider label so the analyzer sees this-usage and the
value stays identical ('local'). vector-store: hoist noop above its
first use (JS-0357 used-before-defined).
editor-mention-picker: scroll-listener cleanup returns a braced body
instead of a void shorthand expression.
vector-store: the finally() chain's catch now takes an inline arrow
instead of a module-level noop referenced before its declaration text-
order, satisfying the used-before-defined analyzer while keeping the
original rejection visible on the returned promise.
JS-0067: module-scope function declarations to const arrows across
app-shell, mobile-drawer, sidebar, right-panel, voice-input, switch,
ai-settings, home-view, library-entities, mindmap, timeline, claims
panel, entity grid/table, inbound tests (AGENTS.md preferred style).

JS-C1002: i18n message-module exports renamed `t` -> `translate`
(16 modules + 31 importers; docs in i18n/t.ts updated).

JS-0415/JS-0045/JS-0400: extract nested JSX, brace arrow bodies,
omit boolean attr values in tests.

JS-R1005: extract mention-query validation, semantic resolution
helpers, entity-table/grid subcomponents; fix EntityGrid/GridCard/
EntityTable/TableRow closers left dangling by the mechanical pass.

JS-0117: 'u' flag on footer regex; JS-W1042: drop redundant arg;
JS-0321: non-empty arrow body in local-adapter test mock.
const arrows do not hoist like function declarations; move component
declarations above their users: MobileDrawer last, HomeView last,
GridCard before EntityGrid, TableRow before EntityTable. Fixes the
used-before-defined findings the JS-0067 conversion introduced.
claim-parser: parenDelta + accept() helpers (CC 6/7 -> low)
vector-store: scoreAll/embedBatch/toSearchResults extraction; await the
  build directly so the slot clears in finally (JS-0098, CC 7/6/6)
mention: isValidMentionQuery extraction (CC 9 -> low)
right-panel: fn decls to const arrows (JS-0067); RankedResultList/
  KeywordResultList/SearchEmptyState/ConnectionList/resolveRankedRowMeta
  (CC 9/7/6 -> low)
sidebar: NavItemButton extraction (CC 7 -> low)
mobile-drawer: rankedToEntities helper (CC 9 -> low); consistent-return
  early form for the media-query listener (JS-0045)
app-shell: extract ViewRouter (CC 13 -> low)
editor-claims-panel: extract ClaimRow (CC 10 + JSX depth -> low)
ai-harness: EngineOptions/EngineSelect + per-provider default map (CC 13)
voice-input: useTranscriptEffects/InterimTranscript/IntentPreview (CC 11)
home-view: RecentItemBody (JSX depth)
timeline-view: RowIcon/RowTypeBadge (CC 6)
library-view: entityForResult/passesTypeFilter/LibraryFooter + async
  debounce callback (JS-0098 void-chain gone; CC 30/8 -> reduced)
editor-view: buildEditorEntity/describeSelection/FORMAT_HANDLERS
  lookup (CC 29/11/9 -> reduced)
right-panel: resolveRankedRowMeta (CC 6)
ai-harness test: omit isLoading value (JS-0400)
Editor save now builds the entity with the same id used to derive
mention links; the applied review edit had left a stale duplicate block
that redeclared mentionLinks/mentions/entity and passed an id-less
editing record into buildEditorEntity, breaking typecheck, lint, and
the vitest transform. Citation dedupe keys switch to JSON.stringify to
avoid delimiter collisions.

Co-authored-by: gitnexus-check[bot] <305171802+gitnexus-check[bot]@users.noreply.github.com>
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…nesting

- editor-view: pass the saved entity id into buildEditorEntity instead of
  letting it mint a second UUID for new entities — the backlink written on
  each mentioned entity now targets the node that is actually saved, so the
  reciprocal edge renders in the graph (caught by the new mentions E2E).
- graph-view: the display-only entity-type legend intercepted clicks on
  nodes laid out beneath it; mark it pointer-events-none.
- right-panel: the inspector wrapped ConnectionList (which renders its own
  <ul>) in another <ul>, tripping the axe `list` rule on the mind map page.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
- editor-view: own-property-guarded FORMAT_HANDLERS lookup (object-injection
  sink) replaces the unguarded index + always-falsy falsy-check pair.
- ai-harness-settings-panel: exhaustive-switch default-model lookup removes
  dynamic indexing and the dead `?? DEFAULT_MODEL.local` branch on a total
  Record (unnecessary-conditional).
- library-view / right-panel: braced statement bodies on void arrow shorthands;
  the semantic-search timer now explicitly owns its async work via `void (async
  () => { ... })()` so no promise is returned where void is expected.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
FORMAT_HANDLERS is now keyed by a closed FormatCommand literal union instead
of string, and handleFormat narrows the raw command through an isFormatCommand
type guard before the lookup — the dynamic-key function retrieval that Codacy's
injection-sink rule flagged is gone entirely, matching the closed-key-space
pattern already merged in topbar.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Addresses the outstanding GitNexus/DeepSource review threads on PR #773:

- search: rename the vector-store import so the client wrapper no longer
  shadows the imported `semanticSearch` binding; re-validate the shared
  index against the request's arrays after query embedding so ranking can
  never score another caller's corpus; abort-responsive wait on an
  in-flight index build.
- ai: race the lazy transformers runtime load against the request signal
  (send + stream) so an aborted request never starts a model download.
- store: apply mutations before pushing history so a batch commit is one
  undo step and the post-commit state is redone verbatim.
- editor: escape backslashes in mention display names, suppress the
  active-descendant when no suggestion is rendered, extract claims from
  the live draft rather than the persisted record, re-measure the mention
  picker on resize.
- embeddings: generation guard so a disposed load cannot overwrite a
  newer runtime's state.
- claim-parser: single-pass paren matcher replaces the quadratic rescans.
- entity-types: reject the reserved `all` sentinel, validate custom icon
  values with a component predicate, return copies of cached built-ins.
- timeline: fall back when a claim timestamp is blank as well as absent.
- library-view/right-panel: honor sort direction and dedupe keys for
  semantic results, gate the empty state, dedupe-safe React keys.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Codacy's only required status check flagged two new "Generic Object Injection
Sink" warnings on the router's `Record` lookups (`VIEW_NAMES[view]`,
`VIEW_ELEMENTS[currentView]`). Both tables are now Maps, so the lookups are
method calls instead of dynamic property access, while the single-branch
router shape (and its complexity win) is preserved.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Adds plan 137 (inventory, impact triage, per-finding remediation, CI outcome
and the two documented open items: the credential-gated Vercel failure on
#773 and the DeepSource JS metric gate) plus the singular month-item label
fix for the timeline review finding.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Follow-up to the GitNexus pass over the remediation commit:

- search: `buildVectorIndex` checks `signal.aborted` before the cached-index
  fast path, so an abort arriving after query embedding still settles as
  AbortError instead of ranking a cached corpus.
- entity-types: the custom-icon predicate accepts only component *types*
  (function, `react.forward_ref`, `react.memo`); an already-instantiated React
  element is no longer accepted as a LucideIcon.
- claims panel: the extraction dedupe key is JSON-encoded instead of
  NUL-joined, so unrestricted statements/sources cannot collide.
- graph: a registered type with a blank `dot` class falls back to the neutral
  token instead of rendering an invisible legend marker.
- library-view: corrected the promise-lifecycle comment (the IIFE is `void`-ed).

Deferred with rationale in plans/137 §5: the semantic type-filter/truncation
ordering, Markdown-context mention extraction, the type-selector keyboard trap,
and the local-adapter fallback (a consumer-side fix — the adapter contract is
covered by 7 tests).

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
allEntities,
claims,
semanticQuery,
SEMANTIC_RESULT_LIMIT,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Retrieve enough ranked documents to fill the entity result cap

vector-store.ts builds one searchable document for every entity and every claim (lines 66-88), and semanticSearch applies its limit to those documents (line 379). This call requests only 100 documents, but resolveSemanticEntities subsequently collapses claim hits to their parent entity (library-view.tsx lines 160-165). Thus, if the highest-ranked 100 documents are claims attached to one entity, the library renders just that entity and omits other relevant entities even though the stated cap is 100 entities.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/studio/views/library-view.tsx, line 100:

<comment>'vector-store.ts' builds one searchable document for every entity and every claim (lines 66-88), and 'semanticSearch' applies its 'limit' to those documents (line 379). This call requests only 100 documents, but 'resolveSemanticEntities' subsequently collapses claim hits to their parent entity (library-view.tsx lines 160-165). Thus, if the highest-ranked 100 documents are claims attached to one entity, the library renders just that entity and omits other relevant entities even though the stated cap is 100 entities.</comment>

<context>Enclosing symbol: useSemanticSearch.</context>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

lastIndexedEntities = null
lastIndexedClaims = null
indexBuilding = null
defaultVectorStore.clear()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Error — Invalidate the cached corpus when a replacement build fails

After a successful build for corpus A, a build for corpus B clears defaultVectorStore here but leaves lastIndexedEntities/lastIndexedClaims pointing at A (they are assigned only on the success path at lines 246–247). A later search using A's original array references takes the cached fast path at lines 285–286 despite the store being empty, and therefore returns an empty source: 'semantic' result instead of rebuilding or falling back. This would not be a defect only if a failed replacement build could not follow a successful build, or if another path invalidated the cached references; doBuildIndex permits that sequence and its failure path only clears the store.

Proposed fix (not committable — GitNexus could not verify this fix is local; review call sites before applying):

    defaultVectorStore.clear()
    lastIndexedEntities = null
    lastIndexedClaims = null
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/search/vector-store.ts, line 205:

<comment>After a successful build for corpus A, a build for corpus B clears 'defaultVectorStore' here but leaves 'lastIndexedEntities'/'lastIndexedClaims' pointing at A (they are assigned only on the success path at lines 246–247). A later search using A's original array references takes the cached fast path at lines 285–286 despite the store being empty, and therefore returns an empty 'source: 'semantic'' result instead of rebuilding or falling back. This would not be a defect only if a failed replacement build could not follow a successful build, or if another path invalidated the cached references; </comment>

<context>Enclosing symbol: doBuildIndex. A fix was proposed but NOT verified as local — check the call sites before applying.</context>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

label: z.string().min(1).max(64).refine((s) => s.trim().length > 0, {
message: 'Entity type label must be a non-blank string',
}),
color: z.string(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Runtime type styling classes are never made available to Tailwind

The registry accepts arbitrary bg, text, and dot class strings from a runtime registration, but the production stylesheet only imports Tailwind (src/app/globals.css:1) and contains neither an @​source/safelist nor generated rules for plugin-provided candidates. Tailwind determines utility CSS during the build, before registerEntityType runs, so a plugin registering a class absent from the scanned application sources will render its type with no corresponding styles. This would not be a defect only if every plugin were restricted to already-compiled classes or shipped its own CSS; the API/documentation instead exposes these as unconstrained Tailwind token strings for runtime plugins (plans/135-n7-entity-types.md:8-18, 46-64).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/studio/entity-types.ts, line 69:

<comment>The registry accepts arbitrary 'bg', 'text', and 'dot' class strings from a runtime registration, but the production stylesheet only imports Tailwind ('src/app/globals.css:1') and contains neither an '@​source'/safelist nor generated rules for plugin-provided candidates. Tailwind determines utility CSS during the build, before 'registerEntityType' runs, so a plugin registering a class absent from the scanned application sources will render its type with no corresponding styles. This would not be a defect only if every plugin were restricted to already-compiled classes or shipped its own CSS; t</comment>

<context>Enclosing symbol: EntityTypeDefSchema.</context>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

console.error(`entity-types: cannot register built-in entity type "${id}"`)
return
}
customTypeDefs.set(id, { ...parsed.data })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Registering after mount does not update any rendered type lists or metadata

registerEntityType mutates only a module-local Map; it neither exposes a subscription nor updates React state. Renderers such as TypeSelector read getEntityTypeDefs() only during their existing render (src/components/studio/views/type-selector.tsx diff, new line 42), so a plugin that registers a type after that component is mounted leaves the currently displayed selector/legend/cards unchanged until an unrelated state update happens. This would not be a defect if registration were guaranteed to complete before all relevant components mount, but the documented goal explicitly promises runtime registration and says registered types “immediately appear” (plans/135-n7-entity-types.md:8-10, 62-64).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/studio/entity-types.ts, line 126:

<comment>'registerEntityType' mutates only a module-local 'Map'; it neither exposes a subscription nor updates React state. Renderers such as 'TypeSelector' read 'getEntityTypeDefs()' only during their existing render ('src/components/studio/views/type-selector.tsx' diff, new line 42), so a plugin that registers a type after that component is mounted leaves the currently displayed selector/legend/cards unchanged until an unrelated state update happens. This would not be a defect if registration were guaranteed to complete before all relevant components mount, but the documented goal explicitly promises</comment>

<context>Enclosing symbol: registerEntityType.</context>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

// today's stay-in-editor behavior.
if (mentions.length > 0) {
finishEditing()
navigateToView('library')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Nit — Do not navigate before preventing the draft unmount flush

handleSave removes draftIdRef.current at line 361, but this new navigation unmounts the editor. useEditorDraft registers an unmount cleanup that always calls flushDraft() (src/components/studio/editor-hooks.tsx:160-173), and flushDraft() rebuilds and saves a draft using that unchanged ref (lines 161-169). Consequently, saving an entity with a mention removes its draft and immediately recreates it during unmount.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/studio/views/editor-view.tsx, line 367:

<comment>'handleSave' removes 'draftIdRef.current' at line 361, but this new navigation unmounts the editor. 'useEditorDraft' registers an unmount cleanup that always calls 'flushDraft()' (src/components/studio/editor-hooks.tsx:160-173), and 'flushDraft()' rebuilds and saves a draft using that unchanged ref (lines 161-169). Consequently, saving an entity with a mention removes its draft and immediately recreates it during unmount.</comment>

<context>Enclosing symbol: EditorView.</context>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

@d-oit
d-oit enabled auto-merge (squash) September 12, 2026 12:49
@d-oit
d-oit merged commit 3787e33 into main Sep 12, 2026
29 of 31 checks passed
@d-oit
d-oit deleted the feat/open-issues-n1-n7-swarm branch September 12, 2026 13:02
d-oit added a commit that referenced this pull request Sep 12, 2026
…779)

The #773 squash merge landed pnpm-lock.yaml with unresolved conflict
markers plus a stale overrides block. pnpm ≥8 auto-merges the markers in
memory so GitHub Actions stayed green, but every Vercel deployment for
that head failed (0 markers at the last green deploy, 3 at the failing
one). Removing the block is a pure deletion — no resolution changes, so
the deliberate adm-zip exclusion and sharp/transformers pins are kept.

Co-authored-by: CI/CD Tester <ci-cd-test@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config documentation Documentation improvements skills tests Related to automated/manual tests

Projects

None yet

2 participants