Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -329,6 +329,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 @@ -268,6 +268,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. Runtime state and inventory data remain explicitly unavailable until integrated. This session reads native session observations; 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; This session reads native session observations. Runtime state remains 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 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. This session shows separate request/action counts, outcomes and millisecond latency, UTC snapshot/retention coverage, manual refresh and confirmed reset. **Preview safe diagnostic summary** opens the exact native text; copying is a separate explicit action with feedback and selectable text for manual recovery. Leaving the view or changing context closes its preview and discards late UI responses.

Expand Down Expand Up @@ -110,6 +110,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-63e9665c-v1` profile; the separately
qualified `sqlite-atomic-3cefa45a-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 @@ -184,7 +198,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 when their contract differs from this build. A saved incompatible or unavailable selection remains visible with an explanation until explicitly replaced. The `sqlite-atomic-3cefa45a-v1` record matches this build's contract and qualifies eleven SQLite protocol operations against the exact Server source and wheel recorded in the validation guide. Select it only after comparing that tested build with your deployment. Existing records retain their original Server source, contract, wheel and operation identities, including the historical `sqlite-atomic-f3a90b2f-v1` qualification. The `ci-fixtures` build is for disposable acceptance tests and does not qualify a production deployment. Qualification evidence and remaining requirements are documented in the [validation guide](VALIDATION.md#compatibility-scope).
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-63e9665c-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-63e9665c-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)。本次会话分别显示请求与操作的数量、结果和毫秒延迟,以及 UTC 快照时间和保留范围;支持手动刷新和确认后重置。“预览安全诊断摘要”展示原生生成的准确文本,复制是独立的显式操作,提供成功或失败反馈及可选择的手动复制文本。离开视图或切换上下文会关闭预览并丢弃晚到的界面响应。

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

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

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

统计需要显式选择 `sqlite-stats-63e9665c-v1` 配置;独立验证的
`sqlite-atomic-3cefa45a-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 @@ -166,7 +178,7 @@ Windows GitHub Actions 会构建未签名安装包,安装到临时中文路径

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

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

## 在 macOS 上构建

Expand Down
Loading
Loading