Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ jobs:
- name: Check installed UI acceptance harness
working-directory: .
run: |
uv run --no-sync ruff check --no-fix desktop/tests/installed_ui.py desktop/tests/installed_fixture.py desktop/tests/installed_workflow.py desktop/tests/fixture_qualification.py
$harnessFiles = @(Get-ChildItem -Path desktop/tests/installed_*.py -File | Sort-Object Name | ForEach-Object { $_.FullName })
$harnessFiles += 'desktop/tests/fixture_qualification.py'
uv run --no-sync ruff check --no-fix @harnessFiles
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
uv run --no-sync ruff format --check desktop/tests/installed_ui.py desktop/tests/installed_fixture.py desktop/tests/installed_workflow.py desktop/tests/fixture_qualification.py
uv run --no-sync ruff format --check @harnessFiles
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
uv run --no-sync ty check desktop/tests/installed_ui.py desktop/tests/installed_fixture.py desktop/tests/installed_workflow.py desktop/tests/fixture_qualification.py
uv run --no-sync ty check @harnessFiles
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
uv run --no-sync ty check --python-platform linux desktop/tests/installed_ui.py desktop/tests/installed_fixture.py desktop/tests/installed_workflow.py desktop/tests/fixture_qualification.py
uv run --no-sync ty check --python-platform linux @harnessFiles
- name: Check fixture qualification regressions
working-directory: .
run: uv run --no-sync python -m pytest tests/test_desktop_fixture_qualification.py
Expand Down
33 changes: 32 additions & 1 deletion desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ Internal Windows and macOS preview for [#1654](https://github.com/oceanbase/powe

See [中文说明](README.zh.md), [security boundary](SECURITY.md), and [validation guide](VALIDATION.md). This is not a supported or signed release, and does not close #1654 or #1428.

## 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.


## Shared feedback and current context

Every page uses the same loading, empty, unavailable and error presentation. Loading local state is distinct from being disconnected; a local-state failure offers **Reload local state**, without probing Server readiness. Empty search results mean no matches for that query, not an empty Scope inventory. Unimplemented Observation views remain unavailable.

Errors explain the affected operation and recovery. Read failures offer an explicit retry; exact reads retain the original Artifact revision. An expired Scope cursor restarts from the first page. Credential, permission and compatibility failures explain the required configuration or authorization change. Save failures keep the draft; unknown writes retain their original target and require the existing confirmation before another submission. Writes are never replayed automatically. Local diagnostic failures offer a retry of the same selected local check and do not indicate remote unavailability.

Draft discard, connection removal and resubmission after an unknown write use an application-owned confirmation dialog in both languages. Cancel is focused initially; Escape or the backdrop cancels, Tab remains within the dialog, and confirming performs only the requested action. The same modal behavior applies to Scope selection. Closing Scope selection restores its actual trigger, or the page heading when that trigger is unavailable.

The global bar shows the active connection, full Server address, Scope title and complete `scope_id` on every page. Identically named Scopes remain distinguishable. Identity, compatibility, liveness and readiness are separate facts; the latest check for the active configuration revision supplies the displayed facts and check time. A healthy Server does not grant operation permissions. Addresses and IDs wrap in small windows. The connection menu supports arrow keys, Home/End and Escape; the Scope dialog constrains focus and restores it when closed.

Settings & diagnostics includes bilingual usage guidance, a locale-specific documentation address and a fixed issue-report address. Copy actions report success or failure; the read-only address fields select their text on focus for manual copying. Help is available without a Server or native connection state. The displayed Desktop version comes from the native host and is Unknown if unavailable.

While a connection operation is pending, a global message remains visible across page changes. You can browse other pages, but Memory editing, saving, searching, exact reads and Scope switching pause until the operation and its native-state refresh finish. This prevents a late activation result from clearing text entered against the old Scope. Once the operation completes, explicitly select an exact Scope if needed. Existing draft confirmations and unknown-write protections continue to apply.

Selecting a saved profile in the global connection menu opens that exact configuration in the editor, including when Connections is already open. Leaving an unsaved editor or Memory draft requires the existing discard confirmation; cancelling preserves the current editor and text. Selecting a configuration never checks or activates it. Explicitly reselecting the same profile after confirming discard reloads its saved values.

Scope selection also keeps an application-wide pending state. Escape, the close button and the backdrop can close the dialog, but do not cancel an accepted native selection. Memory editing and further Scope switching stay paused until it finishes. Closing a dialog whose trigger is disabled returns focus to the page heading. A late result still updates authoritative native state, while it cannot clear a new connection editor's draft guard. Failures after the dialog has closed appear in the shared error feedback.

## Local Server preparation

Overview remains the initial page. In disconnected Memories, **Set up locally** opens and focuses **Settings & diagnostics → Local Server**; **Connect an existing Server** opens the existing connection editor. Selecting either path does not install software, activate a connection, run diagnostics or probe readiness.

The Local Server guidance is also available by opening Settings directly, including when native state is loading or unavailable. It explicitly marks Desktop installation, recovery and service management as unavailable; that status makes no claim about an actual local installation or running service. Settings stays at the bottom of the sidebar.

Prepare a Server independently using [Install and run](../docs/en/docs/get-started/install-and-run.md) and [Deploy the Server](../docs/en/docs/operate/deploy-server.md), observing their platform limits. Confirm the actual address, authentication and a qualified Desktop compatibility profile, then save and explicitly activate the connection and select an exact Scope. A running Server alone does not establish Desktop compatibility. Existing independently running Servers do not need to be reinstalled. The in-app Usage help provides a copyable address for this guide.

## Run the installed preview

Download and extract `desktop-windows-internal-unsigned` from a successful **Desktop validation** Actions run on this branch. The installer is under `src-tauri/target/release/bundle/nsis/`. Its accompanying `.artifacts/windows-smoke.json` records the commit, SHA-256 and signature status; compare the downloaded installer with `Get-FileHash -Algorithm SHA256 <installer-path>`. The current package is unsigned and intended for internal validation.
Expand Down Expand Up @@ -119,7 +150,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-d9a78567-v1` and check the connection before selecting a Scope; that record's contract digest matches this build's bundled contract, while `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 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-1da99747-v1` and check the connection before selecting a Scope; that record's contract digest matches this build's bundled contract, while `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).

## Build on macOS

Expand Down
33 changes: 32 additions & 1 deletion desktop/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@

已实现连接配置、显式激活、身份与就绪检查、精确范围选择和本地诊断。已实现共享笔记表单、FTS 搜索和精确版本阅读;原生交互闭环仍待完整验收。当前不是已签名的正式发行版。

丢弃草稿、移除连接配置和未知写入再次提交均使用应用内双语确认框。初始焦点位于“取消”;Escape 或点击遮罩会取消操作,Tab 保持在对话框内,确认后仅执行所请求的操作。Scope 选择使用相同的模态交互;关闭后焦点返回实际触发按钮,按钮不可用时返回页面标题。

## 观察

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


## 统一反馈与当前上下文

各页面采用一致的加载、空状态、不可用和错误呈现。加载本机状态与未连接分开;本机状态读取失败时可“重新加载本机状态”,不会探测 Server 就绪状态。搜索无结果仅表示当前查询没有匹配项,不代表整个 Scope 库存为空。未接入的观察视图继续显示不可用。

错误说明受影响的操作及恢复方式。读取失败可手动重试,精确读取保持原 Artifact 版本;Scope 游标过期后从第一页重新查找。凭据、权限和兼容性错误提示需要修改的配置或授权。保存失败保留草稿;结果未知的写入保留原目标,再次提交仍需现有确认,不自动重放写入。本机诊断失败可重新执行同一项本机检查,不表示远程服务不可用。

全局栏在每个页面展示当前连接、完整 Server 地址、Scope 标题和完整 `scope_id`,可区分同名 Scope。身份、兼容性、存活和就绪状态分别呈现,采用与当前配置版本一致的最近检查事实并显示检查时间;健康状态不代表操作权限。长地址和 ID 在小窗口下可换行。连接菜单支持方向键、Home/End 和 Escape;Scope 对话框约束焦点,关闭后恢复焦点。

“设置与诊断”内提供双语使用说明、对应语言的文档地址和固定问题反馈地址。复制操作显示成功或失败;只读地址框获取焦点时选中全文,便于手动复制。没有 Server 或本机连接状态不可用时仍可访问帮助。Desktop 版本来自原生信息,获取不到时显示“未知”。

连接操作等待期间,全局提示在页面切换后持续显示。仍可浏览其他页面,但记忆编辑、保存、搜索、精确读取及 Scope 切换暂停,直到操作及其原生状态刷新完成,避免晚到的激活结果清空在旧 Scope 下新输入的正文。操作完成后,按需显式选择精确 Scope;现有草稿确认和未知写入保护继续生效。

从全局连接菜单选择已保存配置,会打开对应配置的编辑器,包括已经位于连接页时。存在连接编辑器或记忆草稿时,继续使用原有丢弃确认;取消后保留当前编辑器及正文。选择配置不会检查或激活连接;确认丢弃后再次选择同一配置,可重新载入已保存的值。

Scope 选择也具有应用层等待状态。Escape、关闭按钮及遮罩可以关闭弹窗,但不会取消已提交的原生选择;完成前暂停记忆编辑及再次切换 Scope。触发按钮被禁用时,关闭弹窗将焦点返回页面标题。晚到结果仍更新原生实际状态,但不会清除新连接编辑器的草稿导航保护;弹窗关闭后发生的失败由共享错误反馈显示。

## Local Server 准备说明

默认启动页仍为总览。记忆页未连接时,“本地设置”进入并聚焦“设置与诊断 → Local Server”;“连接已有 Server”进入现有连接编辑器。选择任一路径都不会安装软件、激活连接、执行诊断或探测就绪状态。

也可直接进入设置查看 Local Server 说明;即使原生状态正在加载或不可用,说明仍可访问。区域明确标注 Desktop 安装、恢复及服务管理尚未接入,不据此判断本机是否已安装 Server 或服务是否运行。侧栏设置入口保持在底部。

请按[安装与运行](../docs/zh/docs/get-started/install-and-run.md)及[部署 Server](../docs/zh/docs/operate/deploy-server.md)独立准备 Server,并遵守文档中的平台适用范围。确认实际地址、认证方式和经过验证的 Desktop 兼容配置,再保存、显式激活连接并选择精确 Scope。Server 已运行不代表 Desktop 兼容性已验证;已有独立运行的 Server 无需重复安装。应用内“使用帮助”可复制本说明的文档地址。

## 直接运行安装版

在本分支的 GitHub Actions「Desktop validation」成功运行中,下载 `desktop-windows-internal-unsigned` 产物并解压,找到 `src-tauri/target/release/bundle/nsis/` 中的安装程序。对应 `.artifacts/windows-smoke.json` 记录提交、安装包 SHA-256 和签名状态,可用 `Get-FileHash -Algorithm SHA256 <安装包路径>` 核对下载文件。当前产物未签名,供内部验证。
Expand Down Expand Up @@ -102,7 +133,7 @@ Windows GitHub Actions 会构建未签名安装包,安装到临时中文路径

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

历史配置显示为不可选择的记录。已保存的不匹配或不可用配置仍会显示并说明原因,须明确替换,不会静默升级。对于已资格化的当前 Server 源码,明确选择 `sqlite-atomic-d9a78567-v1` 并在选取范围前检查连接;该记录的契约摘要与本构建的打包契约匹配,而 `sqlite-atomic-caf2a35a-v1`、`sqlite-atomic-683e2db0-v1` 与 `sqlite-atomic-cab054db-v1` 只资格化各自对应 Server 源码的部署,并不匹配打包契约。已记录的 Server 源码和 wheel 身份必须与实际部署一致。独立验证的 `ci-fixtures` 构建仅用于临时验收测试。历史资格证据和剩余要求见[验证说明](VALIDATION.md)。
历史配置显示为不可选择的记录。已保存的不匹配或不可用配置仍会显示并说明原因,须明确替换,不会静默升级。对于已资格化的当前 Server 源码,明确选择 `sqlite-atomic-1da99747-v1` 并在选取范围前检查连接;该记录的契约摘要与本构建的打包契约匹配,而 `sqlite-atomic-d9a78567-v1`、`sqlite-atomic-caf2a35a-v1`、`sqlite-atomic-683e2db0-v1` 与 `sqlite-atomic-cab054db-v1` 只资格化各自对应 Server 源码的部署,并不匹配打包契约。已记录的 Server 源码和 wheel 身份必须与实际部署一致。独立验证的 `ci-fixtures` 构建仅用于临时验收测试。历史资格证据和剩余要求见[验证说明](VALIDATION.md)。

## 在 macOS 上构建

Expand Down
Loading
Loading