diff --git a/integrations/dsh-doca/README.md b/integrations/dsh-doca/README.md index b9bcae4d..203e4a84 100644 --- a/integrations/dsh-doca/README.md +++ b/integrations/dsh-doca/README.md @@ -9,8 +9,8 @@ The official Doca plugin for DeepSeek Harness (DSH). Inside a DSH conversation t ## What it does - **MCP bridge.** Registers the connected site's MCP server in DSH, so the model reaches Doca through its meta-tools (`doca_tools`, `doca_describe_tools`, `doca_call`, `doca_skills`, `doca_load_skill`, `doca_context_close`) and a bundled skill. -- **Confirmation before structural changes.** Operations that create, move or delete go through a DSH confirmation card; content edits too only when the profile's confirmation mode is `write`; read-only calls do not. -- **File transfer.** `doca_put_files` uploads files from the session workspace to Doca. Paths must be workspace-relative: absolute, home-prefixed and parent-escaping paths are rejected before anything is read. `doca_get_file` saves a Doca text file into the session workspace and never replaces an existing file. Both are confirmed like other writes and appear in the session activity. +- **Confirmation before structural changes.** Operations that create, move or delete go through a DSH confirmation card; content edits too only when the profile's confirmation mode is `write`; read-only calls do not. With the mode `none` these pass without a card, but a request for access to a document, an HTTP request made through Doca and an operation the plugin does not know are confirmed in every mode. +- **File transfer.** `doca_put_files` uploads files from the session workspace to Doca. Paths must be workspace-relative: absolute, home-prefixed and parent-escaping paths are rejected before anything is read. `doca_get_file` saves a Doca text file into the session workspace and never replaces an existing file. Both are confirmed like other writes and appear in the session activity. A file over 20 MiB is refused in either direction. Without a `path`, `doca_get_file` saves under the configured download directory, `doca-downloads` in the session workspace by default. - **Reading pane.** A document the model opens can be read in a native Doca tab (rich text and Markdown; the structure of spreadsheets, slides and canvases), with a link to the full document on the site. - **The Doca site in DSH.** The site opens in a narrow layout made for the DSH surfaces, signed in with the same account as the plugin. - **Identities.** Save several Doca sites with their username and password, and switch between them. @@ -20,21 +20,21 @@ The official Doca plugin for DeepSeek Harness (DSH). Inside a DSH conversation t Three Doca entries share one logic and differ only in where the site appears: - **Left sidebar, Doca** opens the site in the main column. -- **Doca next to the conversation title** switches the site between the main column and the right sidebar. With neither open it opens the right sidebar, unless the site was last shown in the sidebar — then it opens the main column. Closing the sidebar tab does not change which. -- **Start pane, Doca** opens the site in the right sidebar. The tab header offers the session activity, the identity surface, and a return to the main column. +- **Doca next to the conversation title** switches the site between the main column and the right sidebar. With neither open it opens the right sidebar, unless this button or the main column's 在右侧打开 (Open in the sidebar) last put the site there — then it opens the main column. The main column is remembered whichever entry showed it; closing the sidebar tab does not change which. A tab opened from the Start pane is not remembered: with it showing and the main column closed, the first click only brings that tab to the front and the second opens the main column. +- **Start pane, Doca documents** opens the site in the right sidebar, in a tab titled Doca. The tab header offers the session activity, a reload of the embedded page, the identity surface, and a return to the main column. -Switching between the main column and the sidebar keeps the page that was open. A link inside the site that opens a new window stays in the embedded site when it is one of the site's own pages (a document, the ticket list). Anything else opens outside it: an attachment of the site or another site opens in a dock Browser tab, which shares the website session — except a link to another site followed from the main-column view, which goes to the system browser so that the site view stays open. +Moving the site to the sidebar keeps the page that was open, and so does bringing it back to the main column, whether with 在中间打开 (Open in the main view) in the sidebar tab's header or with Doca next to the conversation title. Both site views have a **Reload the page** button in their header that reloads the embedded page where it stands, to pick up a Doca site that was updated on the server while the view stayed open. A link inside the site that opens a new window stays in the embedded site when it is one of the site's own pages (a document, the ticket list). Anything else opens outside it: an attachment of the site or another site opens in a dock Browser tab, which shares the website session. From the main-column view the conversation comes back first to make room for that tab — except for a link to another site, which goes to the system browser instead, so that the site view stays open. ## Connecting a site -The identity surface lists the saved sites, one row each: the username over the site address, and under them a password pill, an MCP key pill and the row's actions. Click a pill to reveal its value, click again to copy the full value to the clipboard, click once more to hide it. The MCP key is shown by its last eight characters only. +The identity surface lists the saved sites, one row each: the username over the site address, and under them a password pill, an MCP key pill and the row's actions. The MCP key pill is shown only when the card is wide enough: in the main column, and in a right sidebar that is wide enough for it. A narrow right sidebar shows the password pill alone. Click a pill to reveal its value, click again to copy the full value to the clipboard, click once more to hide it. The MCP key is shown by its last eight characters only. - **First use** opens the connection form over an empty list. Enter the service address, the username and the password; the address is empty by default, and everything but a loopback address must use HTTPS. -- **+** adds a site the same way. A new site is verified before it becomes the current connection; the previous connection is not touched while verification runs. +- **+** adds a site through the same form. With a site connected, the form opens with its address and the login saved for it filled in; change the address and the filled-in username and password are cleared with it. A new site is verified before it becomes the current connection; the previous connection is not touched while verification runs. - **选择** (Select) on a row switches to that site. The current row is marked 当前 (Current). -- **✕** on a row deletes the saved site and its stored credentials. It asks for a second click, and cannot be undone. +- **✕** on a row deletes the saved site and its stored credentials. It asks for a second click, and cannot be undone. The current row has no ✕: switch to another site first, or add one with **+** if it is the only saved site. - **连接** (Connect) on the current row signs in to that site again and enters it on its document list. It is offered when a password is stored for the site and its session is gone: after you signed out, and after the site refused the stored login — then Connect tries that password once more. -- **Why the site is not signed in** is written under the rows: the site refused the stored login (connect again to update the password), or no password is stored for it. The second case is what you see when the plugin was connected by hand in DSH Settings, with an address and a token reference but no saved site. There the connection form opens over the empty list with the address filled in: sign in there to save the site. Data written by earlier development builds of the plugin is not converted. +- **Why the site is not signed in** is written under the rows: the site refused the stored login (connect again to update the password), or no password is stored for it. The second case is what you see when the plugin was connected by hand in DSH Settings, with an address and a token reference but no saved site. There the connection form opens over the empty list with the address filled in, and that explanation gives way to it: sign in there to save the site. Data written by earlier development builds of the plugin is not converted. - **When the site cannot be connected at all** — it cannot be reached, Doca did not allow MCP access, or the saved token is no longer in the credential store — the surface names the reason instead of the list's Connect, and 重新连接 (Connect again) opens the connection form with the address filled in. Each connection creates a personal MCP service on the Doca site, named `DeepSeek Harness`. A site you delete here keeps its MCP service; revoke it on the site's MCP settings page if you no longer want it. @@ -42,7 +42,7 @@ Each connection creates a personal MCP service on the Doca site, named `DeepSeek ## Where credentials live - **MCP tokens and website passwords** are stored in the Harness credential store (`.credentials.yaml` in the DSH home), as local plaintext, each under a reference name. The list of saved sites is stored there too. Anyone with access to that file can read them. The store belongs to the DSH home, not to a profile: every profile under that home shares the saved sites, the passwords and the MCP tokens. Only the current connection is per profile. -- **The plugin configuration** (one row per profile) holds the current site address and the reference names only. +- **The plugin configuration** (one row per profile) holds the current site address and the MCP token's reference name, and no credentials; its other fields are plugin settings such as the confirmation mode. - **The website session** lives in the browser storage partition that the embedded site shares with the dock's Browser tab. The partition is kept in memory: after an app restart the plugin signs the site in again with the stored password. Until the site is signed in, a cover hides the page, however long the site takes to load: the site's own login page is never what you see. (When the site has loaded but its API does not answer, the cover lifts after a few seconds onto the site's own offline page.) - **A logout you perform inside the site** is respected for the rest of the run. The identity surface takes over at once, and the site is signed in again only when you connect, switch, or restart the app. - **Credentials stay with their site.** The plugin sends a stored password only to the site it was saved for, including while a switch is still in progress. A password the site refuses is not sent again until you connect, select an identity, sign in or restart the app: Doca limits login attempts per IP address, and signing in by hand shares that limit. @@ -51,9 +51,10 @@ Each connection creates a personal MCP service on the Doca site, named `DeepSeek - **Password sign-in only.** A site that signs users in through an external provider cannot be connected, and the site's own login page is never shown inside the plugin. - **Company-service profiles** (a configured user ID) keep their fixed connection. They cannot switch identities, and the hosted website is not signed in from the plugin: the surface says so instead, and the connection form does not open by itself there. -- **The narrow layout ships with a Doca release.** A site that runs an older Doca shows its ordinary layout on the same address. +- **The narrow layout ships with a Doca release** (0.3.2 was the first). A site that runs an older Doca shows its ordinary layout on the same address. - **Harness Desktop only** for the embedded site. Without the desktop browser bridge the Doca entries offer the connection and identity surfaces but no site view. - **Attachments that download rather than display** (a PDF, an archive) cannot be saved from inside DSH: its embedded browser cancels downloads. +- **Copying inside the site is limited.** DSH denies its embedded pages the Clipboard API. On a site that runs Doca 0.3.6 or later, copy and cut in a spreadsheet (and the share dialog's copy-link button while a sheet is open) reach the clipboard through the browser's older copy path; on an older Doca they fail with the sheet's 无法访问剪贴板 (“Permission Denied”) warning and copy nothing. Copying an image, and the copy buttons of other pages (the MCP token on the site's settings page, share links outside a sheet), fail on every version. - **An identity is saved by signing in to its site.** Changing its username or password means connecting again. ## Development @@ -84,5 +85,5 @@ The tests keep this directory's own `vitest.config.ts` and vitest version. The r ## Version constraints - `engines.dsh` is pinned to `>=0.2.2-rc.2 <0.3.0`. The pre-release tag has to be part of the range, otherwise `0.2.2-rc.x` does not match `>=0.2.2`. Verify before widening it after a DSH upgrade. -- Runtime dependencies are pinned exactly. `@deepseek-ai/cordis` is a development dependency only: at run time DSH provides Cordis, so the plugin's DSH types are written by hand in `src/dsh-types.ts` and checked against the DSH source on every upgrade. +- Runtime dependencies are pinned exactly. `@deepseek-ai/cordis` is a development dependency only: at run time DSH provides Cordis, so the plugin's DSH types are written by hand and checked against the DSH source on every upgrade: `src/dsh-types.ts` for the host half, and `client/index.ts`, `client/tabs.tsx` and `dsh-primitives.d.ts` for the client half. The Typert protocol's own types are not re-declared; they come from the pinned `@deepseek-ai/dsh-typert-protocol`. - `engines.node` is `>=24.9` because DSH requires it. On an older Node, pnpm reports an unsupported engine for this package during `pnpm install` and whenever one of its scripts runs. That is a warning: neither the install nor the checks are stopped by it. diff --git a/integrations/dsh-doca/README.zh-CN.md b/integrations/dsh-doca/README.zh-CN.md index f1030baa..3f4c4d6c 100644 --- a/integrations/dsh-doca/README.zh-CN.md +++ b/integrations/dsh-doca/README.zh-CN.md @@ -9,8 +9,8 @@ Doca 的官方 DeepSeek Harness(DSH)插件。在 DSH 的对话里,模型 ## 功能 - **MCP 桥接。** 把已连接站点的 MCP 服务注册进 DSH,模型通过 Doca 的元工具(`doca_tools`、`doca_describe_tools`、`doca_call`、`doca_skills`、`doca_load_skill`、`doca_context_close`)和随插件打包的技能使用 Doca。 -- **结构性变更先确认。** 创建、移动和删除操作先弹出 DSH 的确认卡片;当 profile 的确认模式为 `write` 时,内容修改也会确认;只读调用不打扰。 -- **文件传输。** `doca_put_files` 把会话工作区里的文件上传到 Doca。路径必须是工作区相对路径:绝对路径、`~` 开头和向上逃逸的路径在读取任何内容之前就被拒绝。`doca_get_file` 把 Doca 的文本文件保存进会话工作区,绝不覆盖已有文件。两者和其它写操作一样需要确认,并出现在活动记录里。 +- **结构性变更先确认。** 创建、移动和删除操作先弹出 DSH 的确认卡片;当 profile 的确认模式为 `write` 时,内容修改也会确认;只读调用不打扰。确认模式为 `none` 时这几类不再弹出卡片直接通过,但申请文档的阅读权限、通过 Doca 发出的 HTTP 请求,以及插件不认识的操作,在任何模式下都会确认。 +- **文件传输。** `doca_put_files` 把会话工作区里的文件上传到 Doca。路径必须是工作区相对路径:绝对路径、`~` 开头和向上逃逸的路径在读取任何内容之前就被拒绝。`doca_get_file` 把 Doca 的文本文件保存进会话工作区,绝不覆盖已有文件。两者和其它写操作一样需要确认,并出现在活动记录里。超过 20 MiB 的文件在上传和下载时都会被拒绝。不传 `path` 时,`doca_get_file` 保存到配置的下载目录,默认是会话工作区里的 `doca-downloads`。 - **阅读窗格。** 模型读过的文档可以在原生的 Doca 标签页里阅读(富文本和 Markdown;表格、演示和画板显示结构),并附带站点上完整文档的链接。 - **DSH 里的 Doca 站点。** 站点以专为 DSH 界面设计的窄版式打开,登录的就是插件连接所用的账号。 - **多身份。** 保存多个 Doca 站点及其用户名和密码,并在它们之间切换。 @@ -20,21 +20,21 @@ Doca 的官方 DeepSeek Harness(DSH)插件。在 DSH 的对话里,模型 三处 Doca 入口共用一套逻辑,只是站点出现的位置不同: - **左侧栏的 Doca** 在中间主列打开站点。 -- **会话标题旁的 Doca** 在中间主列和右侧栏之间切换站点。两处都没有打开时,打开右侧栏;除非站点上次显示在右侧栏,则打开中间主列。关掉右侧栏的标签页不会改变这一点。 -- **开始面板的 Doca** 在右侧栏打开站点。标签页头部提供活动记录(会话的操作记录)、身份界面,以及回到中间主列。 +- **会话标题旁的 Doca** 在中间主列和右侧栏之间切换站点。两处都没有打开时,打开右侧栏;除非上次是这个按钮或中间主列的**在右侧打开**把站点放到右侧栏的,则打开中间主列。中间主列不论从哪个入口显示都会被记住;关掉右侧栏的标签页不会改变这一点。从开始面板打开的标签页不会被记住:它显示着而中间主列没有打开时,第一次点只是把这个标签页提到前面,第二次才打开中间主列。 +- **开始面板的 Doca 文档**在右侧栏打开站点,标签页标题为 Doca。标签页头部提供活动记录(会话的操作记录)、刷新嵌入页面、身份界面,以及回到中间主列。 -在中间主列和右侧栏之间切换时,当前打开的页面会保留。站点内打开新窗口的链接,如果是站点自己的页面(文档、工单列表),留在嵌入的站点里;其余的都在它之外打开:站点的附件和别的站点在停靠区的浏览器标签页里打开,那里共用网页会话——只有在中间主列的站点视图里点到别的站点时例外,它会交给系统浏览器,站点视图保持不动。 +把站点移到右侧栏时,当前打开的页面会保留;回到中间主列时也一样,不论是点右侧栏标签页头部的**在中间打开**,还是点会话标题旁的 Doca。中间主列和右侧栏两处的头部都有一个**刷新页面**按钮,就地重新加载嵌入的页面,用来载入视图开着的时候服务器上更新过的站点。站点内打开新窗口的链接,如果是站点自己的页面(文档、工单列表),留在嵌入的站点里;其余的都在它之外打开:站点的附件和别的站点在停靠区的浏览器标签页里打开,那里共用网页会话。在中间主列的站点视图里,对话会先回来,给这个标签页让位——只有点到别的站点时例外,它改交给系统浏览器,站点视图保持不动。 ## 连接站点 -身份界面列出已保存的站点,一行一个:用户名在上、站点地址在下,下方一行是密码和 MCP 密钥两枚胶囊和这一行的操作。点击胶囊显示值,再点一次把完整值复制到剪贴板,第三次点击重新隐藏。MCP 密钥只显示末尾八位。 +身份界面列出已保存的站点,一行一个:用户名在上、站点地址在下,下方一行是密码和 MCP 密钥两枚胶囊和这一行的操作。MCP 密钥胶囊只在卡片足够宽时显示:中间主列里显示,右侧栏要拉得足够宽才显示;窄的右侧栏只显示密码胶囊。点击胶囊显示值,再点一次把完整值复制到剪贴板,第三次点击重新隐藏。MCP 密钥只显示末尾八位。 - **首次使用** 会在空列表上直接打开连接表单。依次填写服务地址、用户名和密码;地址默认为空,除本机回环地址外必须使用 HTTPS。 -- **+** 用同样的方式添加站点。新站点通过验证后才成为当前连接;验证期间原连接不受影响。 +- **+** 用同一张表单添加站点。已连接站点时,表单打开时已填好该站点的地址和为它保存的登录信息;改掉地址,已填好的用户名和密码随之清空。新站点通过验证后才成为当前连接;验证期间原连接不受影响。 - 某一行上的**选择**切换到该站点。当前的一行标记为“当前”。 -- 某一行上的 **✕** 删除已保存的站点及其存储的凭据。它要求再点一次确认,且无法撤销。 +- 某一行上的 **✕** 删除已保存的站点及其存储的凭据。它要求再点一次确认,且无法撤销。当前行没有 ✕:先切换到别的站点;只有这一个站点时,先用 **+** 添加一个。 - 当前行上的**连接**重新登录该站点,并进入站点的文档列表。站点保存了密码、而网页会话又没了的时候才会提供连接:在你退出登录之后,以及在站点拒绝保存的登录信息之后——这时连接会用该密码再试一次。 -- **站点为什么没有登录**会写在列表下方:站点没有接受保存的登录信息(重新连接以更新密码),或者这个站点没有保存密码。在 DSH 设置里手动填写地址和令牌引用连上的站点属于后一种(没有保存过站点)。这时连接表单已经打开在空列表上,地址也填好了:在那里登录即可保存站点。插件的早期开发版本写下的数据不会被转换。 +- **站点为什么没有登录**会写在列表下方:站点没有接受保存的登录信息(重新连接以更新密码),或者这个站点没有保存密码。在 DSH 设置里手动填写地址和令牌引用连上的站点属于后一种(没有保存过站点)。这时连接表单已经打开在空列表上,地址也填好了,那句说明暂时让位给它:在那里登录即可保存站点。插件的早期开发版本写下的数据不会被转换。 - **站点根本连不上时**——无法访问、Doca 不允许 MCP 访问,或者保存的令牌已不在凭据库里——身份界面会说明原因,而不是提供列表上的连接;**重新连接**会打开连接表单,并填好地址。 每次连接都会在 Doca 站点上创建一个名为 `DeepSeek Harness` 的个人 MCP 服务。在这里删除站点不会影响站点上的这个服务;不再需要时,请在站点的 MCP 设置页撤销它。 @@ -42,7 +42,7 @@ Doca 的官方 DeepSeek Harness(DSH)插件。在 DSH 的对话里,模型 ## 凭据存在哪里 - **MCP 令牌和网页密码**保存在 Harness 凭据库中(DSH home 下的 `.credentials.yaml`),是本地明文,各占一个引用名。已保存站点的列表也存在那里。能读到这个文件的人就能读到它们。这个凭据库属于 DSH home,不属于某个 profile:同一个 DSH home 下的所有 profile 共用已保存的站点、密码和 MCP 令牌;只有当前连接是按 profile 区分的。 -- **插件配置**(每个 profile 一行)只保存当前站点地址和引用名。 +- **插件配置**(每个 profile 一行)保存当前站点地址和 MCP 令牌的引用名,不含任何凭据;其余字段是确认模式之类的插件设置。 - **网页会话**位于嵌入站点与停靠区浏览器标签页共用的浏览器存储分区里。这个分区只在内存中:应用重启后,插件会用保存的密码重新登录站点。登录完成之前,一层遮罩盖住页面,无论站点加载多久:你看到的从来不是站点自己的登录页。(站点已加载但它的接口不应答时,几秒后遮罩撤去,露出站点自己的离线页。) - **你在站点里主动退出登录**会在本次运行期间一直有效。身份界面立刻接管,只有当你点连接、切换身份或重启应用时才会重新登录。 - **凭据只属于它的站点。** 插件只把保存的密码发回保存时对应的站点,切换身份进行中也一样。站点拒绝过的密码不会再发,直到你点连接、选择身份、登录或重启应用:Doca 按 IP 地址限制登录次数,手动登录也共用这个额度。 @@ -51,9 +51,10 @@ Doca 的官方 DeepSeek Harness(DSH)插件。在 DSH 的对话里,模型 - **只支持账号密码登录。** 通过外部身份提供方登录的站点无法连接;插件内从不显示站点自己的登录页。 - **公司服务 profile**(配置了用户 ID)保持固定的连接,不能切换身份,插件也不为它登录托管网页:身份界面会说明这一点,也不会自己打开连接表单。 -- **窄版式随 Doca 发版提供。** 运行较旧 Doca 的站点在同一个地址上显示普通版式。 +- **窄版式随 Doca 发版提供**(从 0.3.2 起)。更早发行版的站点在同一个地址上显示普通版式。 - **嵌入站点仅限 Harness 桌面端。** 没有桌面浏览器桥接时,Doca 入口只提供连接和身份界面,没有站点视图。 - **需要下载而不是直接显示的附件**(PDF、压缩包)无法在 DSH 里保存:它的内嵌浏览器会取消下载。 +- **站点里的复制受限。** DSH 拒绝嵌入的页面使用剪贴板接口。站点运行 Doca 0.3.6 或更新版本时,表格里的复制和剪切(以及表格打开期间分享对话框里的复制链接)通过浏览器更早的复制方式到达剪贴板;运行较旧 Doca 的站点上,它们以表格的“无法访问剪贴板”警告失败,什么都不会复制。复制图片,以及其它页面上的复制按钮(站点 MCP 设置页里的令牌、表格之外的分享链接),在任何版本上都失败。 - **身份靠登录它的站点来保存。** 更换用户名或密码意味着重新连接。 ## 开发 @@ -84,5 +85,5 @@ pnpm check:dsh-doca # 类型检查、测试和构建;仓库的 `pnpm ## 版本约束 - `engines.dsh` 锁定 `>=0.2.2-rc.2 <0.3.0`。预发布号必须写进范围,否则 `0.2.2-rc.x` 匹配不上 `>=0.2.2`。升级 DSH 后先验证再放宽。 -- 运行时依赖精确固定版本。`@deepseek-ai/cordis` 只是开发依赖:运行时由 DSH 提供 Cordis,所以插件用到的 DSH 类型全部手写在 `src/dsh-types.ts`,每次升级都对照 DSH 源码核实。 +- 运行时依赖精确固定版本。`@deepseek-ai/cordis` 只是开发依赖:运行时由 DSH 提供 Cordis,所以插件用到的 DSH 类型都是手写的,每次升级都对照 DSH 源码核实——宿主半部在 `src/dsh-types.ts`,界面半部在 `client/index.ts`、`client/tabs.tsx` 和 `dsh-primitives.d.ts`。Typert 协议自身的类型没有重写,来自精确固定的运行时依赖 `@deepseek-ai/dsh-typert-protocol`。 - `engines.node` 是 `>=24.9`,同样来自 DSH 的要求。在更旧的 Node 上,`pnpm install` 和每次运行这个包的脚本时,pnpm 都会提示它的引擎不受支持。这只是警告:安装和检查都不会因此中止。 diff --git a/integrations/dsh-doca/SMOKE.md b/integrations/dsh-doca/SMOKE.md index fc586e21..b2706db7 100644 --- a/integrations/dsh-doca/SMOKE.md +++ b/integrations/dsh-doca/SMOKE.md @@ -17,7 +17,8 @@ Use an isolated DSH home and a local Doca development instance. Never run this a ## The site in DSH 6. The left entry shows the site in the main column; the title action moves it to the right sidebar and back; the start-pane entry opens it in the right sidebar. Each surface shows the site at full height. -7. Open a document, then switch between the main column and the sidebar: the document stays open. The same holds for the session activity view (the 活动记录 control in the sidebar tab's header). +7. Open a document, then move the site to the right sidebar with Doca next to the conversation title: the document stays open. In the sidebar, open another document, then return to the main column both ways — first with 在中间打开 (Open in the main view) in the sidebar tab's header, then with Doca next to the conversation title. Both times the main column shows the document the sidebar was showing. The same holds for the session activity view (the icon-only **Activity** control in the sidebar tab's header; 活动记录 in the Chinese interface). +7a. Click **Reload the page** (刷新页面) in the sidebar tab's header and again in the main column's header: the embedded page reloads in place, stays on that document and keeps the narrow layout; the site view is not rebuilt. 8. Inside the site, a link that opens a new window stays in the embedded site when it is one of the site's own pages (a document, the ticket list). An attachment of the site opens in a dock Browser tab that is signed in, and so does a link to another site. From the main-column view, a link to another site leaves for the system browser and the site view stays open. 9. Quit DSH with a saved identity and start it again, then open a Doca entry: the site is signed in by itself, with no identity surface shown in between. 10. Sign out inside the site: the identity surface appears within a second and the site stays signed out. The current row offers **Connect** and carries no hint. Click **Connect**: the site is signed in again on its document list, and the surface closes. @@ -52,4 +53,4 @@ Use an isolated DSH home and a local Doca development instance. Never run this a ## Not covered here -Real-time collaboration inside the embedded site; company-service profiles (a configured user ID); sites that sign in through an external provider; the deployed site before it runs a Doca release with the narrow layout; attachments that download rather than display (DSH cancels downloads); a reading tab's link to the full document while the site is signed out (it needs model activity to open a reading tab, and is covered by the component tests). +Real-time collaboration inside the embedded site; company-service profiles (a configured user ID); sites that sign in through an external provider; the deployed site before it runs a Doca release with the narrow layout; attachments that download rather than display (DSH cancels downloads); a reading tab's link to the full document while the site is signed out (it needs model activity to open a reading tab, and is covered by the component tests); copy and cut in an embedded spreadsheet (it depends on the site's Doca version: available from 0.3.6, a warning on older sites; covered by the web app's own tests). diff --git a/integrations/dsh-doca/SMOKE.zh-CN.md b/integrations/dsh-doca/SMOKE.zh-CN.md index 8e6bd1b7..ee8b1f01 100644 --- a/integrations/dsh-doca/SMOKE.zh-CN.md +++ b/integrations/dsh-doca/SMOKE.zh-CN.md @@ -17,7 +17,8 @@ ## DSH 里的站点 6. 左侧入口在中间主列显示站点;标题上的操作把它移到右侧栏再移回来;开始面板入口在右侧栏打开它。每个位置都以完整高度显示站点。 -7. 打开一篇文档,然后在中间主列和右侧栏之间切换:文档保持打开。右侧栏标签页里的活动记录视图同理。 +7. 打开一篇文档,然后用会话标题旁的 Doca 把站点移到右侧栏:文档保持打开。在右侧栏里再打开另一篇文档,然后分别用两种方式回到中间主列——先点右侧栏标签页头部的**在中间打开**,再点会话标题旁的 Doca——两次中间主列显示的都是右侧栏当时正在看的那篇文档。右侧栏标签页里的活动记录视图同理。 +7a. 分别点击右侧栏标签页头部和中间主列头部的**刷新页面**:内嵌页面就地重新加载,仍停在这篇文档上,仍是窄版式,站点视图没有重建。 8. 在站点内部,打开新窗口的链接如果是站点自己的页面(文档、工单列表),留在嵌入的站点里。站点的附件在停靠区的浏览器标签页里打开,那里是登录状态;指向别的站点的链接也是。在中间主列的站点视图里,指向别的站点的链接交给系统浏览器,站点视图保持打开。 9. 保存了身份后退出 DSH,再启动,然后打开一个 Doca 入口:站点自动登录,中间不显示身份界面。 10. 在站点里退出登录:一秒以内出现身份界面,站点保持未登录。当前一行提供**连接**,不带任何提示。点击**连接**:站点重新登录并显示文档列表,界面收起。 @@ -52,4 +53,4 @@ ## 这里没有覆盖 -嵌入站点里的实时协作;公司服务配置(配置了用户 ID 的配置文件);通过外部身份提供方登录的站点;在跑着带窄版式的 Doca 发布版本之前的已部署站点;需要下载而不是直接显示的附件(DSH 会取消下载);站点未登录时阅读标签页里“打开全文”的链接(打开阅读标签页需要模型活动,这条由组件测试覆盖)。 +嵌入站点里的实时协作;公司服务配置(配置了用户 ID 的配置文件);通过外部身份提供方登录的站点;在跑着带窄版式的 Doca 发布版本之前的已部署站点;需要下载而不是直接显示的附件(DSH 会取消下载);站点未登录时阅读标签页里“打开全文”的链接(打开阅读标签页需要模型活动,这条由组件测试覆盖);嵌入站点里表格的复制和剪切(取决于站点的 Doca 版本:0.3.6 及以上可用,更旧的站点会警告;由网页应用自己的测试覆盖)。 diff --git a/integrations/dsh-doca/client/index.ts b/integrations/dsh-doca/client/index.ts index 303de51d..7c7fc68a 100644 --- a/integrations/dsh-doca/client/index.ts +++ b/integrations/dsh-doca/client/index.ts @@ -230,6 +230,10 @@ function registerUi(ctx: UiContext): void { return } if (siteLocation() === 'sidebar') { + // The middle view resumes from the page the sidebar view is showing, as it does + // for the tab header's own button; before this the page the sidebar had moved on + // to was left behind and the column reopened on the page it last showed itself. + if (homeTabUrl !== undefined) panelUrl = withNarrowMarker(panelSite, homeTabUrl) writeSiteLocation('panel') ctx.layout.selectPanel(PANEL_ID) return diff --git a/integrations/dsh-doca/test/client.test.ts b/integrations/dsh-doca/test/client.test.ts index ae04a79b..924ab028 100644 --- a/integrations/dsh-doca/test/client.test.ts +++ b/integrations/dsh-doca/test/client.test.ts @@ -139,11 +139,20 @@ describe('Doca sidebar tabs', () => { await action?.inject?.().openDoca?.() expect(openTab).toHaveBeenCalledExactlyOnceWith('doca-home') mountedSession = 'session-1' + // The sidebar view moved on to a document of its own. The conversation action must + // bring that page back to the main column, not the page the column last showed. + const DOC_IN_SIDEBAR = 'https://doca.example.test/#/r/sidebar-doc' + bodies[1]?.inject?.().noteUrl?.(DOC_IN_SIDEBAR) + // The column has shown the site before: mounting reads the connection, which is + // what lets a hand-off put the narrow marker back on the page. + await panel?.inject?.().resolveUrl?.(new AbortController().signal) // With the site hosted in the sidebar, the conversation action brings the site view back. panelActive = false await action?.inject?.().openDoca?.() expect(selectPanel).toHaveBeenLastCalledWith(PANEL_ID) expect(openTab).toHaveBeenCalledTimes(1) + // The page comes along, with the narrow marker added again as the tab header's button adds it. + expect(panel?.inject?.().initialUrl?.()).toBe(`${DOC_IN_SIDEBAR}?from=dsh&layout=compact`) // When the site view is the active panel, the action hands the page to the sidebar. panelActive = true await action?.inject?.().openDoca?.()