Commit Graph

6968 Commits

Author SHA1 Message Date
George·Dong
ef1ae2cbca docs(backup): clarify manifest and step-0 version gate readability
- split manifest fields into definition + version-field role table
- explain release migration regen rationale for backupFormatVersion bump
- restructure §9 step 0 with nested list (format check / schema compare
  three states / failure handling / cross-branch)
- add user-facing error for migrate-forward failure, matching other
  gate-failure branches

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
backup/v2-backup-arch-baseline-2026-06-19
2026-06-19 17:07:14 +08:00
George·Dong
d24ae5adaf docs(backup): M3 version gate + identity propagation
Respond to 0xfullex re-review (M3 blocker + recommendations),
converged via 3 rounds of codex adversarial review.

M3 manifest version gate + migrate-on-import (§2.2, §9 step 0):
- schemaMigrationId compared by folderMillis (drizzle orders by it,
  not tag lexicographic)
- release-time clean initial migration regen triggers backupFormatVersion
  major bump
- migrate-forward on isolated client vs backup.sqlite only when producer
  chain is consumer prefix; failure aborts without live rollback

B1 defer_foreign_keys precision (§9): defers enforcement only, not ON
DELETE actions; OVERWRITE uses upsert, explicit DELETE limited to
leaf/junction; RESTRICT vs NO ACTION note.

agent_workspace as domain-internal cross-aggregate owning ref (§3.5
session:false, §5.4): invariant 25->19 owning chain; invariant 14
excludes intra-domain cross-aggregate owning refs.

identity propagation: rewrite FK to natural-key target canonical id on
FIELD_MERGE (§5.4, §6.1, §8, tests). required vs tolerant classification
(workspace required / fileEntryId tolerant). Covers agent_session.
workspaceId, agent_channel.workspace, job_schedule(type='agent.task').
jobInputTemplate.workspace.

recoverOnBoot as DbService.onInit pre-migrate gate (§9).

minor: §3.6 encryption time-box + workspace product question,
Preference reloadFromDb wiring (§9).

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-18 22:48:34 +08:00
George·Dong
b19aa276c5 docs(backup): dedup workspaceId, replace #N with 不变量 N
- §5.3 remove duplicated agent_session.workspaceId discussion (kept in §5.4)
- replace prose #N invariant refs with 不变量 N (avoid GitHub issue autolink)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-17 13:50:49 +08:00
George·Dong
ec0b12a939 docs(backup): fix broken refs, dangling D19, §6.1, terminology
- §3.1->§三.1, §1.3->§3.5, §6->§6.2 (broken section references)
- remove dangling D19 (JSON soft ref now finalize #12)
- add §6.1 subsection (EntityGraphSchema header)
- alignment 键->UNIQUE 键; full-width punctuation; explicit pronoun
- unify include member / 列级 FIELD_MERGE terminology

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-17 12:04:16 +08:00
George·Dong
a695c013a0 docs(backup): sync unique-key roots, label prototype refs
- §3.5 TAGS_GROUPS/AGENTS/SKILLS roots with UNIQUE constraint aligned to
  natural-key/FIELD_MERGE (tag.name, pin, agent_workspace.path,
  agent_global_skill.folderName) per §6.2 derivation
- §1 label DomainRegistry/DomainStripper/DomainImporter/FileCollector as
  early v2 prototype names (not in branch); fix BackupManager->LegacyBackupManager

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-17 00:16:10 +08:00
George·Dong
4b12f0861c docs(backup): invariant #13 unique key, cross-agg fk handling
- #13 identityKey is PK or business UNIQUE key (sync §6.2 derivation)
- §5.4 cross-aggregate owning FK: assistant_knowledge_base knowledgeBaseId
  omitted->DELETE_ROW in compact mode; agent_session.workspaceId ownership
  conflict (suggest session renamable:false, pending product confirm)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 23:58:28 +08:00
George·Dong
5ed00f788e docs(backup): unique-key identity, agent_skill owner, rename edge cases
- identityKey/identityClass derivation: root with UNIQUE constraint (non-PK)
  must align on business unique key as natural-key (FIELD_MERGE), else
  cross-device same-value different-UUID hits SQLite UNIQUE
- §3.5 AGENTS lists agent_skill (junction ref, agentId+skillId)
- §5.3 RENAME edge cases (session workspace share, topic.activeNodeId scalar
  soft ref) documented as implementation-phase known gaps

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 23:26:13 +08:00
George·Dong
335e04210a docs(backup): junction skip rule, schedule re-arm, DB_FOREIGN_KEYS output
- §5.2 junction reference follows root on SKIP/RENAME (cascade-prune, not
  cloned); no cross-domain id remap (attachments render via message.data
  fileEntryId, not file_ref.sourceId)
- AGENTS afterImport must re-arm job_schedule timers (DB import skips
  registerJobSchedule)
- add DB_FOREIGN_KEYS to codegen output contract (finalize #19/#24/#25)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 22:56:05 +08:00
George·Dong
6716a2dae1 docs(backup): file_ref ownership rationale, cross-domain FK, planned scripts
- add §5.1 file_ref belongs to FILE_STORAGE (file_entry member, not
  source-owned): fileEntryId NOT NULL cascade FK is owning member; job_schedule
  row-scope analogy does not hold (no cross-domain NOT NULL FK)
- clarify finalize #6: source table owned by declarer, target may be cross-domain
- drop 'desensitization' from beforeArchive step (self-use keeps plaintext)
- mark backup:refs:generate/check as planned (not yet in package.json)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 22:25:19 +08:00
George·Dong
ff1d0c2816 docs(backup): fix fileEntryId path, api-key warning, dangling refs
- document actual file ref path (parts[].providerMetadata.cherry.fileEntryId)
- reconcile api-key result-page warning with threat model
- retarget dangling §6.1 / 第五章 references

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 20:00:44 +08:00
George·Dong
8c5bb1a2af docs(backup): clarify casing, add entity_tag, split translate_history
- DbColumnName is Drizzle property name (camelCase); physical SQLite column
  is snake_case via casing:'snake_case'. backup uses drizzle builder only
- add entity_tag to §3.5 TAGS_GROUPS overview (junction, tagId->tag cascade)
- split translate_history into two independent aggregates (translate_language
  natural-key + translate_history uuid-entity); it has no languageCode column,
  only source/targetLanguage optional FKs

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 19:46:37 +08:00
George·Dong
75e8675fbe docs(backup): drop dangling F1 tag, sync invariants #14/#15, dedupe agent_task
- remove undefined F1 reference (codex review artifact)
- sync §8.5 #14/#15 with registry.md (parent chain + derivation)
- dedupe agent_task note (§5 removed, §4 retained as single source)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 18:53:59 +08:00
George·Dong
5db946ce0c docs(backup): drop openspec path reference (local-only symlink)
openspec/ is a local symlink not tracked by git; referencing it in
the git-tracked architecture doc is a dead link for other clones.
The restore-safety trio is now self-contained in §9.

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 13:49:18 +08:00
George·Dong
4dc1b4484e docs(backup): composite pk derivation, finalize invariant #25
- composite PK → natural-key derivation (preference aggregate)
- add finalize invariant #25 (reverse FK declaration check)
- sync invariant count 24 → 25

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-16 09:26:29 +08:00
George·Dong
a25d61e900 docs(backup): fix openspec path, conflictDefault example, domain overview
- fix openspec ref to change-proposal backup-restore-safety/ (6 files)
- correct §6.2 conflictDefault example (no domain deviates from default)
- split §3.1 decision table into default vs user-override rows
- add §3.5 14-domain overview (aggregate root / renamable / conflictDefault)

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-15 22:34:57 +08:00
George·Dong
351cef71f9 docs(backup): adopt eurfelux review findings (remap hook, derives, overwrite)
- drop remapJsonFields hook (jsonSoftReferences retained for export only)
- mirror finalize 24 invariants list to architecture doc
- rewrite SKIP rationale (post-remap: idempotency + non-destructive)
- clarify AggregateBoundary fields as derived by default
  (root/renamable hand-written; identityKey/identityClass/conflictDefault/members
  derived from references + primaryKeys, explicit override for exceptions)
- define OVERWRITE as row-level replace keeping local-only members
  (consistent with merge-semantics non-deletion)
- uniform renamable:false RENAME degradation notice via RestoreResult
- support multi-level cascade in AggregateBoundary.members (parent field)
- clarify 39-table coverage test as post-sync target / pre-sync dynamic

Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-15 14:23:45 +08:00
George·Dong
b5f6cb259b docs(backup): fix residual job_schedule row-scope conflicts in design docs
Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-14 22:29:26 +08:00
George·Dong
014329d81a docs(backup): sync finalize invariant count to 24
Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-14 22:21:49 +08:00
George·Dong
c0bf6a4ed8 docs(backup): adopt codex findings (job_schedule row-scope, codegen FK)
Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-14 22:21:00 +08:00
George·Dong
82f4282806 docs(backup): sync architecture doc with v2 review revisions
Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-14 19:29:54 +08:00
George·Dong
bb947aae4f docs(backup): add v2 modular contributors design
Signed-off-by: George·Dong <GeorgeDong32@qq.com>
2026-06-14 17:35:51 +08:00
槑囿脑袋
94b7641898 fix(knowledge-migration): preserve v1 vector DB during v2 migration (#15843)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-09 21:06:33 +08:00
beyondkmp
e844a1b4f8 fix(resource-selector): stop the open effect from looping refetches (#15831)
Co-authored-by: Payne Fu <payne@Paynes-MacBook-Air.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: Payne Fu <payne@Paynes-MacBook-Air.local>
2026-06-09 18:01:53 +08:00
xianzuyang9-blip
cdeaf05af0 fix(ai-core): align package exports with tsdown output (#15830)
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
2026-06-09 18:01:37 +08:00
jd
29286cad38 refactor(agent-session): make workspace binding explicit (#15736)
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: jdzhang <625013594@qq.com>
Signed-off-by: zhangjiadi225 <625013594@qq.com>
2026-06-09 17:50:31 +08:00
槑囿脑袋
cd65d2ff30 fix(file-processing): group OCR menu by feature and reorder providers (#15835)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-09 17:50:12 +08:00
槑囿脑袋
1382a8dd7c feat(knowledge): route embeddings and reranking through the AI service (#15796)
### What this PR does

Before this PR:

- Knowledge embeddings and reranking ran through the legacy
embedjs-based
knowledgeV1 stack with their own provider clients, independent of the
app's
  AI service.
- File-processing intake accepted several heterogeneous input shapes,
and
knowledge file items were tracked by FileEntry ids, coupling file
content to
  the file-manager entry/cache.

After this PR:

- Embeddings and reranking are routed through the unified `AiService`
(with
cherryin rerank support) and guarded by strict embedding-dimension
validation
  that rejects stale/mismatched vectors.
- File-processing intake is collapsed to a single path-based model;
knowledge
  file items are stored by base-relative path under the knowledge-base
directory, and v1 uploads are copied into the v2 base dir during
migration so
  migrated items stay reindexable/restorable.
- Legacy `knowledgeV1` is removed; the orchestration services were
renamed to
  `KnowledgeService` / `FileProcessingService`.
- Chat -> knowledge attach is temporarily disconnected (tracked TODO)
while the
  v2 file-manager bridge is rebuilt.

Fixes #N/A (no linked issue)

### Why we need it and why it was done in this way

Routing embeddings/rerank through `AiService` unifies provider handling
and
credentials and removes the parallel embedjs client stack and its v1
coupling.
Storing knowledge files by base-relative path (instead of FileEntry ids)
makes
each knowledge base self-contained and portable.

The following tradeoffs were made:

- A large, coordinated refactor plus a migration step that physically
copies v1
uploads into the v2 base dir, in exchange for removing the parallel
client
  stack and making bases self-contained.
- Base-relative path storage required a fail-fast/dedup strategy for
same-named
  files and a guard for blank legacy filenames.

The following alternatives were considered:

- Keeping the embedjs stack behind an adapter — rejected; perpetuates
the
  parallel client and v1 coupling.
- Keeping FileEntry-id storage — rejected; couples knowledge files to
the
  file-manager cache and blocks portability.

### Breaking changes

- `knowledgeV1` is removed. Legacy v1 knowledge data reaches v2 only
through the
  v2 migrators; there is no v1 fallback.
- The v2 knowledge HTTP API (API gateway) now returns v2-native
per-entry fields
(`embeddingModelId`, `createdAt` on base entries; `chunkId`,
`scoreKind`,
  `rank` on search results). The response envelope (`knowledge_bases`,
  `searched_bases`, `total`) is unchanged. See

`v2-refactor-temp/docs/breaking-changes/2026-06-05-knowledge-api-v2.md`.

### Special notes for your reviewer

- This branch went through several rounds of multi-agent code review.
The most
recent 6 commits address review findings: directory-import path
collisions,
migrated-file source copying + blank `relativePath` guard, addItems
rollback
error preservation, eager `document_to_markdown` output-target
validation, a
`CompletedKnowledgeBase` type guard, and breaking-changes doc
corrections.
- Chat -> knowledge attach is intentionally disconnected for now
(tracked in
  `v2-refactor-temp/docs/knowledge/knowledge-todo.md`).
- Local full `pnpm lint`/`pnpm test` was not run per the project's
review
  conventions; please rely on CI / `pnpm build:check`.

### Checklist

- [x] Branch: This PR targets the correct branch — `main` for active
development, `v1` for v1 maintenance fixes
- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: Write code that humans can understand and Keep it simple
- [x] Refactor: You have left the code cleaner than you found it (Boy
Scout Rule)
- [x] Upgrade: Impact of this change on upgrade flows was considered and
addressed if required
- [ ] Documentation: A user-guide update was considered and is present
(link) or not required.
- [x] Self-review: I have reviewed my own code before requesting review
from others

### Release note

```release-note
NONE
```

---------

Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:04:29 +08:00
SuYao
c08bdba8d4 feat(search): add entity and content search DataApi endpoints (#15696)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: zhangjiadi225 <59188306+zhangjiadi225@users.noreply.github.com>
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: jdzhang <625013594@qq.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: jdzhang <625013594@qq.com>
2026-06-09 12:05:32 +08:00
github-actions[bot]
e253288896 🤖 Daily Auto I18N Sync: Jun 09, 2026 (#15825)
Co-authored-by: kangfenmao <8253512+kangfenmao@users.noreply.github.com>
2026-06-09 10:36:38 +08:00
fullex
3fa8551e73 docs(naming-conventions): generalize 4.10 feature modules across main and renderer
The features/ vs type-bucket split applies to both process roots (src/main/features/, src/renderer/features/); update the definition and the sibling-bucket note to cover the renderer (components/, hooks/, utils/).
2026-06-08 09:58:15 -07:00
fullex
1f493d5d6a docs(architecture-overview): refresh main/renderer tree and core/data subsystem references
Rewrite the src/ tree to the current v2 layout: add main/{ai,features,utils}, drop the to-be-removed knowledge/integration/apiServer and the v1 renderer store/aiCore, remove the redundant renderer src/ level, and move shared/ under src/.

Replace the flat subsystem table with a core/ subsystem table (Lifecycle, Window Manager, Scheduler & Jobs, Paths), link each system in Four Data Systems to its overview, and drop the non-core MCP/CherryClaw/Knowledge/Message-System/API-Server rows. Correct window ownership to WindowManager, and point to Naming Conventions 4.10 for the feature-vs-bucket placement rule.
2026-06-08 09:58:15 -07:00
fullex
5c9450b57a docs(naming-conventions): add features/ module placement rule (§4.10)
Establish when a main-process domain belongs in src/main/features/ versus the services/ and utils/ type-buckets: a domain earns its own features/<domain>/ tree only when it is large, complex, and multi-file, while a single cohesive service (even domain-specific) stays as services/<Domain>Service.ts with its lone helper in utils/.

Decouple naming from placement in §4.5, and surface the rule in the §1 quick reference and the §7 decision tree.
2026-06-08 06:19:21 -07:00
fullex
71a65aac86 test(builtin-skills): co-locate installBuiltinSkills test with its module
Move builtinSkills.test.ts from src/main/__tests__ into src/main/utils/__tests__ next to src/main/utils/builtinSkills.ts, and update the under-test import and the barrel mock to the new relative paths.
2026-06-08 05:31:56 -07:00
fullex
be568bfdb0 test(mcp): consolidate mcp tests into the shared co-located suite
src/main/__tests__/mcp.test.ts exercised src/shared/mcp.ts, sitting one layer away from the module it covers and duplicating the home of the existing src/shared/__tests__/mcp.test.ts. Merge its toCamelCase, buildMcpToolName, generateMcpToolFunctionName and buildFunctionCallToolName suites into the shared file and drop the misplaced copy.
2026-06-08 05:31:40 -07:00
槑囿脑袋
8155df1d4c fix(knowledge-page): correct navigator and recall layouts (#15732)
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-08 17:05:22 +08:00
SuYao
de580c2fb1 feat(api-gateway): port the universal API gateway onto v2 (ElysiaJS rewrite) (#15705)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-07 18:04:26 +08:00
Phantom
e7d06d594c fix(file-migrator): cross-platform v1 recovery and row-level read fault isolation (#15737)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: icarus <eurfelux@gmail.com>
2026-06-07 09:08:52 +08:00
fullex
89dc40d467 docs(data-api): forbid non-data side effects on DataApi code paths
DataApi handlers and their services may perform only SQLite reads/writes via Drizzle; fs/network/process/external-service side effects are prohibited regardless of nesting depth or an accompanying DB write. Add a Hard Rule section to api-design-guidelines, scope-limit service domain workflows to DB I/O, and echo the boundary in the overview and README.
2026-06-06 09:02:06 -07:00
Asurada
fe78d6bd62 fix(provider-settings): preserve scroll position after drag reorder (#15677)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: ousugo <dkzyxh@gmail.com>
2026-06-06 18:18:14 +08:00
lanshi
26574a2848 feat: add OpenAI Responses API format support for dashscope and doubao (#15724)
Signed-off-by: lanshi <yzs20030317@gmail.com>
2026-06-06 18:06:52 +08:00
槑囿脑袋
67554c5703 feat(ai-service): add rerank runtime support (#15542)
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-06 17:33:18 +08:00
jd
c5fdc30927 feat(settings-page): refine provider and shortcut controls (#15658)
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: jdzhang <625013594@qq.com>
2026-06-06 16:47:36 +08:00
槑囿脑袋
e818c374e6 refactor(knowledge): remove sitemap source from v2 (#15682)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-06 16:26:15 +08:00
fullex
afd4bd5ec2 feat(logger): let CS_DIAGNOSTICS unlock dev-equivalent logging in packaged builds
Previously the CSLOGGER_* console overrides and the verbose (silly) file level were gated behind isDev, so a packaged build could not raise its log level for troubleshooting. Replace the isDev gates in both the main and renderer LoggerService with isDev || DIAGNOSTICS_ENABLED, so setting CS_DIAGNOSTICS makes the logger behave exactly as in dev: verbose file level, console output, and the CSLOGGER_* filters all turn on together. Idempotent in dev.

Reuses the existing DIAGNOSTICS_ENABLED flag as the single source of truth; the renderer reads CS_DIAGNOSTICS via the preload-exposed process.env. Document the behavior in the diagnostics and logging guides.
2026-06-06 01:00:02 -07:00
jd
0a31f2c371 fix(provider-settings): skip unsupported model health probes (#15730)
Signed-off-by: jdzhang <625013594@qq.com>
2026-06-06 15:57:33 +08:00
fullex
3ad5eef096 feat(diagnostics): add opt-in CS_DIAGNOSTICS performance facility
Promote the temporary boot profiler into a permanent, opt-in diagnostics facility gated by CS_DIAGNOSTICS (off by default, zero overhead when unset). Move it to src/main/core/diagnostics.ts so the db and lifecycle layers no longer cross-import a lifecycle-internal file.

Probes, all gated by the same flag: per-service init timing, phase service spans, event-loop lag, and a whenReady V8 CPU profile (carried over); slow DB queries, now covering interactive-transaction interiors and batches (not just client.execute); slow IPC handlers (BaseService.ipcHandle); window construction + ready-to-show latency (WindowManager); and slow DataApi requests (ApiServer).

DataApi request duration is consolidated to a single monotonic performance.now() measurement in handleRequest, computed only when enabled; the redundant Date.now() duration in MiddlewareEngine is removed and metadata.duration is now optional.

Packaged-build safe: the CPU profile is written to the app logs directory (not process.cwd()) and a failed write can never break boot. Thresholds live in SLOW_THRESHOLD_MS; usage in docs/guides/diagnostics.md.

Also demote per-service stop/destroy logs to debug to quiet shutdown output.
2026-06-06 00:16:25 -07:00
fullex
49047cbf03 perf(selection): defer hook + window warm-up off the boot critical path
SelectionService loaded the native selection-hook addon and built the toolbar + action-pool windows synchronously in onReady, during the WhenReady boot phase, stalling the concurrent main-window creation on the single main thread.

Move activation to onAllReady + setImmediate so it warms up after the main window paints. The first text selection still feels instant — no text can be selected this early in cold start. A pre-fire stop stays safe: _doActivate() no-ops unless the service is Ready.
2026-06-05 22:52:56 -07:00
fullex
6ca0615e1d perf(message): index status to back boot pending-reconcile lookup
The boot reconcile of crash-orphaned pending assistant turns (findPendingAssistantMessageIds) full-scanned the message and agent_session_message tables. Add a plain status index on each so the lookup is a SEARCH, not a SCAN.

Plain, not partial: Drizzle binds status = ?, which SQLite cannot match against a partial (literal-predicate) index. Also select only id, since the reconcile just flips matched rows to error.
2026-06-05 22:52:33 -07:00
fullex
bc86fb6a2e refactor(storage-monitor): move disk-space monitoring to the main process
Replace the v1 renderer-driven disk polling with a main-process service:

- Remove checkAppStorageQuota (browser storage-quota >=95% warning); v2
  business data lives in main-process SQLite, so the browser-side quota no
  longer reflects where data is stored.
- Add StorageMonitorService (WhenReady, @DependsOn WindowManager): fs.statfs
  with capacity-adaptive polling (5-60 min by free space), pushing health
  transitions (ok<->low) to the main window only.
- Rename utils/dataLimit.ts to hooks/useStorageMonitorNotification.ts, a thin
  subscriber that drives the existing antd notification (UI migration deferred
  to the broader v2 refactor).
- Drop the App_GetDiskInfo IPC handler, the getDiskInfo preload API, and the
  check-disk-space dependency.
- Add a breaking-change entry for the removed storage-quota warning.
2026-06-05 20:33:45 -07:00
github-actions[bot]
e1bb199e44 🤖 Daily Auto I18N Sync: Jun 06, 2026 (#15725)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
2026-06-06 09:39:19 +08:00