Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
83d71ac
feat(desktop): integrate exact-Scope statistics through native IPC
WuShang-d Oct 24, 2026
34c61c5
feat(desktop): visualize current-Scope inventory and usage
WuShang-d Oct 24, 2026
bde9972
test(desktop): validate native statistics journeys and zoom
WuShang-d Oct 24, 2026
0cc9036
fix(desktop): sync statistics with master and repair docs links
WuShang-d Oct 24, 2026
7f6ef3c
fix(desktop): merge current master and refresh statistics qualification
WuShang-d Oct 26, 2026
434859f
fix(desktop): reconcile master and preserve server fixture cleanup
WuShang-d Oct 27, 2026
1c7911c
fix(desktop): wire inventory panel and integrate discovery
WuShang-d Oct 28, 2026
9341edb
fix(desktop): integrate current master and session observations
WuShang-d Oct 29, 2026
f13d065
docs(desktop): preserve qualification evidence when merging master
WuShang-d Oct 30, 2026
79ccd1c
fix(desktop): integrate current contracts and lockfile baseline
WuShang-d Oct 30, 2026
89e1553
fix(ci): align migration and Code fixtures with current master
WuShang-d Oct 31, 2026
9e7d8d8
fix(desktop): distinguish pending statistics context
WuShang-d Oct 31, 2026
4f0be5e
fix(desktop): qualify bundled statistics through product path
WuShang-d Nov 1, 2026
5bb0b7e
fix(desktop): preserve statistics qualification on receipt contract
WuShang-d Nov 2, 2026
eb30a2d
fix(desktop): integrate deployment fencing and current qualification
WuShang-d Nov 3, 2026
31e9294
ci: rerun validation after SQLite concurrency failure
WuShang-d Nov 3, 2026
daddf65
fix(desktop): integrate statistics with session observation UI
WuShang-d Nov 4, 2026
31e5392
fix(desktop): qualify statistics after ownership contract update
WuShang-d Nov 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ Coding and memory evaluations, performance benchmarks, and Skill regressions liv

## Learn more

- [Desktop preview: exact-Scope inventory and usage](desktop/README.md#current-scope-inventory-and-usage)
- [Get started](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/)
- [Connect Agents](https://powercontext.oceanbase.io/en/docs/integrations/)
- [Manage context](https://powercontext.oceanbase.io/en/docs/workflows/)
Expand Down
1 change: 1 addition & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ make test

## 进一步了解

- [桌面预览:精确范围的存量与用量](desktop/README.zh.md#当前范围的存量与用量)
- [开始使用](https://powercontext.oceanbase.io/zh/docs/get-started/quickstart/)
- [接入 Agent](https://powercontext.oceanbase.io/zh/docs/integrations/)
- [管理上下文](https://powercontext.oceanbase.io/zh/docs/workflows/)
Expand Down
18 changes: 16 additions & 2 deletions desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ See [中文说明](README.zh.md), [security boundary](SECURITY.md), and [validat

## Observation

The sidebar provides Overview, Connections, Memories, and Observation, with Settings & diagnostics at the bottom. Overview is the initial page. Observation contains Runtime state, Current-Scope inventory & usage, and This session tabs. Their data views are explicitly unavailable until integrated; opening the page or switching tabs does not run connection checks or local diagnostics. English/Chinese and existing theme settings apply to Observation.
The sidebar provides Overview, Connections, Memories, and Observation, with Settings & diagnostics at the bottom. Overview is the initial page. Observation contains Runtime state, Current-Scope inventory & usage, and This session tabs. Inventory & usage hosts the qualified Statistics view; Runtime state and This session remain unavailable until integrated; opening the page or switching tabs does not run connection checks or local diagnostics. English/Chinese and existing theme settings apply to Observation.

The native host collects a bounded, in-memory window of HTTP requests and Memory/Scope user operations independently of page navigation. Trusted typed IPC provides an allowlisted summary, reset and safe JSON preview. The window retains at most 512 terminal records; it preserves cancellation and unknown-write outcomes and contains no content or target identities. See the [session observation contract](../docs/en/development/desktop-session-observations.md) for measurement units, coverage, reset and failure isolation. The This session page and clipboard flow require separate UI integration.

Expand Down Expand Up @@ -106,6 +106,20 @@ Search uses FTS in the selected Scope and returns at most 10 matches. This is no

A successful save that returns no memory record is reported as an operation success without inventing a reference. A timeout or interrupted dispatched write is **unknown**, not a safe invitation to retry: inspect the original Server/Scope before deciding whether to submit again. Identical text alone cannot identify that operation. Desktop does not automatically replay writes or keep an offline queue. Switching context hides old results while retaining minimal original-operation metadata for this session. See [validation guide](VALIDATION.md) for tested behavior and qualification gaps.

## Current-Scope inventory and usage

In **Observation → Current-Scope inventory & usage**, explicitly activate a qualified connection, select an exact Scope,
choose **Today**, **Last 7 days** or **Last 30 days**, then press **Load statistics**.
The view displays the Server timestamp, Scope coverage, inventory snapshot,
recorded UTC model usage and recall token estimates. Missing token counts remain
**Unknown**; estimates are not billing savings or quality scores. Every chart has
an equivalent table and keyboard-scrollable region. A statistics error does not
disable independent Memory actions. See the [developer contract](../docs/en/development/desktop-statistics.md)
and [qualification evidence](VALIDATION.md#current-scope-statistics-qualification).

Statistics require the explicit `sqlite-stats-0b0a1c71-v1` profile; the separately
qualified `sqlite-atomic-dd62723d-v1` profile covers Memory operations only.

## Native discovery results

Connection checks call the public `get_server_info` operation through the existing native transport. `CheckReport.discovery` reports `supported`, `missing`, `denied`, `unavailable`, `invalid`, or `incompatible`, the observed Server metadata, safe errors, and per-operation `qualified`/`unsupported`/`unverified` results with reasons. Compatible discovery minor versions accept additional optional fields in the response and its nested version/feature objects.
Expand Down Expand Up @@ -172,7 +186,7 @@ Installed boundary checks exercise an 8192-byte Unicode note, reject over-budget

After upgrading from an earlier preview, open Connections and select your saved connection. Profiles matching the bundled API contract appear under “Available for this Desktop build”; compare their tested Server builds with your deployment before selecting one, saving, checking and explicitly using the connection again. New connections start with no compatibility selection.

Historical profiles appear as disabled records. A saved incompatible or unavailable selection remains visible with an explanation until explicitly replaced; it is never silently upgraded. For the qualified current Server sources, explicitly choose `sqlite-atomic-68491568-v1` and check the connection before selecting a Scope; that record's contract digest matches this build's bundled contract, while `sqlite-atomic-dd62723d-v1`, `sqlite-atomic-98275dbb-v1`, `sqlite-atomic-1da99747-v1`, `sqlite-atomic-8f10c560-v1`, `sqlite-atomic-d9a78567-v1`, `sqlite-atomic-caf2a35a-v1`, `sqlite-atomic-683e2db0-v1` and `sqlite-atomic-cab054db-v1` qualify their corresponding Server source deployments and do not match it. The recorded Server source and wheel identities must match the deployment you intend to use. The independently qualified `ci-fixtures` build is for disposable acceptance tests. Historical qualification evidence and remaining requirements are documented in the [validation guide](VALIDATION.md).
Historical records whose digest differs from this build remain disabled. A saved incompatible or unavailable selection stays visible until explicitly replaced; it is never silently upgraded. For statistics, explicitly select `sqlite-stats-0b0a1c71-v1`, whose recorded Server source and wheel must match the intended deployment, then check and activate the connection and select an exact Scope. This record matches the bundled contract and qualifies all twelve Desktop operations, including `get_stats`. Other records retain their original source, digest, wheel and operation sets; selecting them does not add statistics qualification. The `ci-fixtures` build is only for disposable acceptance. Source identities and remaining platform requirements are in the [validation guide](VALIDATION.md#server-0b0a1c71-statistics-product-qualification).

## Build on macOS

Expand Down
16 changes: 14 additions & 2 deletions desktop/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## 观察

侧栏提供总览、连接、记忆、观察入口,“设置与诊断”位于侧栏底部。默认进入总览。“观察”包含运行状态、当前 Scope 库存与用量、本次会话三个标签页。数据视图接入前明确显示尚未可用;进入页面或切换标签不会执行连接检查或本机诊断。观察页面沿用现有中英文和主题设置。
侧栏提供总览、连接、记忆、观察入口,“设置与诊断”位于侧栏底部。默认进入总览。“观察”包含运行状态、当前 Scope 库存与用量、本次会话三个标签页。库存与用量已接入统计视图,运行状态和本次会话接入前明确显示尚未可用;进入页面或切换标签不会执行连接检查或本机诊断。观察页面沿用现有中英文和主题设置。

原生宿主独立于页面导航,采集有界的内存窗口,分别记录 HTTP 请求和 Memory/Scope 用户操作。可信的类型化 IPC 提供白名单摘要、重置和安全 JSON 预览。窗口最多保留 512 条终态记录,保留取消及未知写入的区别,不包含内容或目标身份。测量单位、覆盖范围、重置和故障隔离见[会话观察契约](../docs/zh/development/desktop-session-observations.md)。本次会话页面和剪贴板流程仍需独立的 UI 集成。

Expand Down Expand Up @@ -139,6 +139,18 @@ Desktop 在每次诊断前检查固定路径和摘要,然后只允许 `service

[验证说明](VALIDATION.md)列出可复现的检查方式和待完成的平台、产品验收项。

## 当前范围的存量与用量

统计需要显式选择 `sqlite-stats-0b0a1c71-v1` 配置;独立验证的
`sqlite-atomic-dd62723d-v1` 配置仅覆盖 Memory 操作。

在“观察 → 当前 Scope 库存与用量”中显式启用已验证兼容的连接、选择精确范围和“今天/最近 7 天/最近
30 天”后,点击“加载统计”。页面展示 Server 时间、范围覆盖、存量快照、已记录
的 UTC 模型用量和召回 token 估算。缺失 token 数保持“未知”;估算不代表账单
节省或质量提升。每个图表均有等价表格,滚动区域可通过键盘聚焦。统计错误不禁用
独立的 Memory 操作。详见[开发契约](../docs/zh/development/desktop-statistics.md)和
[资格证据](VALIDATION.md#current-scope-statistics-qualification)。

## 远程安装包验收

Windows GitHub Actions 会构建未签名安装包,安装到临时中文路径,并通过匹配且验证 Microsoft 签名的 WebDriver 操作实际安装的 WebView2 页面。测试使用独立 SQLite Server,覆盖启用连接、精确范围选择、中文多行笔记保存、全文查找、精确阅读,以及正文和引用复制后的粘贴核对。Server 使用合成数据,测试结束后清理。
Expand All @@ -155,7 +167,7 @@ Windows GitHub Actions 会构建未签名安装包,安装到临时中文路径

从早期预览版升级后,请打开「连接」并选中已保存的连接。与当前 API 契约匹配的配置显示在「此 Desktop 构建可用」中;先核对已测试的 Server 构建与实际部署,再明确选择、保存、检查并使用该连接。新连接默认不选择兼容配置。

历史配置显示为不可选择的记录。已保存的不匹配或不可用配置仍会显示并说明原因,须明确替换,不会静默升级。对于已资格化的当前 Server 源码,请按记录的 Server 源码和 wheel 明确选择 `sqlite-atomic-68491568-v1`,检查连接后再选择范围。该记录匹配本构建的契约,并保留独立验证的操作集合。包括 `sqlite-atomic-c535d816-v1` 在内的历史配置保留原有 Server 源码、契约和操作集合,不匹配本构建的打包契约。已记录的 Server 源码和 wheel 身份必须与实际部署一致。独立验证的 `ci-fixtures` 构建仅用于临时验收测试。历史资格证据和剩余要求见[验证说明](VALIDATION.md)。
契约摘要不匹配的历史记录不可选择。已保存的不匹配或不可用配置仍会显示,须明确替换,不会静默升级。使用统计时,请明确选择 `sqlite-stats-0b0a1c71-v1`,并核对部署与记录的 Server 源码、wheel 身份一致,再检查和激活连接、选择精确范围。该记录匹配打包契约,覆盖包括 `get_stats` 在内的十二项桌面操作。其他记录保留各自的源码、摘要、wheel 和操作集合,选择记录不会扩展其统计资格。`ci-fixtures` 仅用于临时验收。[验证说明](VALIDATION.md#server-0b0a1c71-statistics-product-qualification)记录来源和剩余平台要求。

## 在 macOS 上构建

Expand Down
Loading
Loading