Skip to content

合并 dsh-desktop main 到 Bisheng Work - #8

Merged
Fairy-happy merged 6 commits into
mainfrom
merge/dsh-main-into-bisheng
Sep 23, 2026
Merged

Fairy-happy merged 6 commits into
mainfrom
merge/dsh-main-into-bisheng

Conversation

@Fairy-happy

@Fairy-happy Fairy-happy commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • 将 dataelement/dsh-desktop 的 main(69705b2,tag v0.9.2)合入当前 Bisheng Work。
  • 带入 Safe Mode 页面重做、desktop 资源协议、启动恢复修复,并移除 Green Pulse 内置 PPT 模板。
  • 冲突处保留企业登录,以及插件市场里的 BISHENG Work 文案。Safe Mode 插件行的版本和状态改由新的行装饰逻辑渲染。

Test plan

  • npm run typecheck
  • npm test(153 files,1315 tests)
  • 桌面端打开 Safe Mode,确认插件版本、状态和升级按钮
  • 企业登录链路仍可用
  • 已选中 Green Pulse 的会话会迁到 engineering blueprint

Made with Cursor

Fairy-happy and others added 6 commits September 22, 2026 21:45
* 修复上传与回答中的文档预览 (#434)

* 修复上传与回答中的文档预览:走附件真实路径,失败则本机打开

官方已支持输入框拖文件、回形针和默认工作区,不再重复实现。预览统一通过 fileHostPath 打开右侧面板,插件关闭或渲染失败时回退系统应用。

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(preview): match Windows attachment names without case and keep images if aliasing fails

Explorer treats names as case-insensitive, and a failed hard-link should not block opening the original image path.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: built-in image generation plugin (#447)

* feat: add shared OpenAI and ByteDance image generation plugin

* fix: align image settings and support Electron image writer

* fix: use Seedream single-image contract and retain provider diagnostics

* feat(image-generation): streamline calls and preview generated images

* fix(image-generation): use shared dropdown menus

* fix(image-generation): complete Seedream model presets

* fix(image): resolve Harness session IDs for conversation previews

* test(image): align migration with current session format

* test(image): scope credential mode assertion to POSIX

* fix(release): type rollout configuration tests

* docs: refresh main migration evidence

* fix(runtime): await failed Harness shutdown

* ci: retry Windows verification

* 加固生图插件:未配置时禁止引导调用,并隔离 sharp 启动风险

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(image-generation): fail closed on unread settings and buffer Host GET routes

Credential read failures must not look like an empty revision-0 store, and exact GET routes need a buffered body so Host preview and settings reach the plugin.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Jianghan <58623049+SuperstructureJH@users.noreply.github.com>
Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(mobile): require a desktop PIN for internet pairing (#426)

* feat(mobile): require a desktop PIN for internet pairing

Wi-Fi can connect on scan, but a public tunnel URL can leak, so the phone must enter a 6-digit password shown only on the computer.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): 桌面 PIN 仅对本机 socket 可见

隧道入口也落在 127.0.0.1,只认转发地址会把 PIN 漏到公网;Windows 覆盖长效 PIN 前先删旧文件。

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): dock the Pinggy expiry hint below the input

The overlay covered the composer. Keep the field in place when the hint is hidden.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: add agents-standards-review.zh.md to .gitignore

* fix(mobile): center the Pinggy expiry hint

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): bind desktop PIN routes to a session cookie

Tunnel requests can share loopback sockets and spoof Host, so PIN
visibility now requires a one-time bootstrap token exchanged for an
HttpOnly desktop cookie. Same-IP cookie promotion is LAN-only.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(diagnostics): 停用 unclean-exit 误报弹窗 (#448)

覆盖安装、强杀和首启未就绪会留下同版本 session marker,反复弹出故障报告;不再采集此类报告,已入队的也静默丢弃。

Co-authored-by: fairy <3054158379@qq.com>

* fix(ppt): keep template previews inside gallery cells (#449)

Selection borders and focus outlines overflowed the grid. Keep the 2px border inside each cell, drop the default gray inset, and disable native image dragging so Electron does not pull a ghost thumbnail.

Co-authored-by: fairy <3054158379@qq.com>

* fix(ppt): validate literal newline escapes before export (#453)

* fix(ppt): keep template previews inside gallery cells

Selection borders and focus outlines overflowed the grid. Keep the 2px border inside each cell, drop the default gray inset, and disable native image dragging so Electron does not pull a ghost thumbnail.


* fix(ppt): validate literal newline escapes before export

Block leftover \n/\r in text and table cells so slides no longer show escape residue, while real YAML line breaks still export.


---------

Co-authored-by: fairy <3054158379@qq.com>

* 修复 Windows CI 清理临时目录时的 EBUSY 误报

存储测试在异步 flush 后立刻删除目录,GitHub Windows runner 上文件句柄尚未释放会导致 rmdir 失败。对锁定错误做短重试,避免测试本身已通过却被清理拖垮。

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ppt): 在 V0.9.1 上加入 Green Pulse 可编辑配图模板 (#465)

* feat(ppt): 在 V0.9.1 上加入个人模板上传与复用

基于最新 V0.9.1 重做个人模板能力,保留画廊预览与换行导出修复,并限制上传体积、按页返回审查预览。


* fix(ppt): accept OOXML that undeclares unused namespace prefixes

WPS and PowerPoint emit xmlns:foo="", which JSDOM's well-formed outerHTML rejects during personal-template conversion.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ppt): ship Green Pulse as a bundled editable image template

Give the catalog a reviewed 22-page PPTD project with hashed copy, image-slot contracts, and chart export fixes so image-assisted decks do not depend on personal uploads.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ppt): load personal-template limits from the packed runtime in tests

Avoid Vite parsing the CLI bundle via a source import, which fails Windows CI with a SyntaxError before any test runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* 修复 Windows CI 清理 startup-failure 临时目录时的 EBUSY 误报

Harness 子进程刚退出后立刻 rmdir,GitHub Windows runner 上句柄未释放会拖垮已通过的测试。对锁定错误做短重试。



---------

Co-authored-by: fairy <3054158379@qq.com>

* feat(enterprise): add BiSheng gateway login on 0.9.1 without sending … (#457)

* feat(enterprise): add BiSheng gateway login on 0.9.1 without sending tokens into Harness

Keep market 1.45.1, migration protocol 6, and safe-mode inspect-only; chat goes through a main-process SSE proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): normalize CRLF before matching the desktop patch

Windows checkout turns the YAML into CRLF, so the inject assertion must not depend on LF-only line endings.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): wait for the model catalog after login in Windows CI

commitSession publishes connected before models sync, so assertions must wait for modelsAvailable. Also match the desktop patch without depending on LF-only regex groups.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): wait for per-model usage after login

modelsAvailable flips true before GET /usage finishes, so the PKCE test must wait for bisheng:42 used tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): defer connected until per-model usage sync completes

Keep phase as refreshing after commitSession so settings keep polling until syncCatalog finishes usage, avoiding the empty first-load model usage state.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): publish models before usage and sync the chat adapter on settings reads

Existing sessions missed the enterprise catalog after login because revision waited on usage and the idle adapter poll was too slow.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): follow the product locale for settings and known chat errors

The enterprise settings page ignored Settings -> General language changes, and desktop-owned chat failures stayed English. Register the settings copy with the locale service and localize known adapter fallbacks without rewriting platform messages.



---------

Co-authored-by: fairy <3054158379@qq.com>

* fix(patch): 修正合入 main 后 dsh 补丁 hunk 行数

Git 自动合并把生图与 log-bridge 依赖拼进同一 hunk,却仍写 +12,patch-package 在 Windows 上会直接解析失败。

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(enterprise): 展示视觉模型标识并精简 Token 用量 (#484)

* feat(enterprise): show managed vision and compact model usage

* feat(settings): polish enterprise account UI and align section titles

Add a pill Learn about Enterprise control, refresh enterprise copy, and
match settings page titles to the plugins heading style.


* feat(enterprise): reframe intranet HTTP confirmation around a trusted source

Ask users to confirm the cleartext service URL comes from a trusted origin before login.


---------

Co-authored-by: Jianghan <58623049+SuperstructureJH@users.noreply.github.com>
Co-authored-by: fairy <3054158379@qq.com>

* fix(enterprise): 补齐登录元数据、桌面唤回与旧设置迁移 (#494)

从 #492 干净重投登录版本字段、登录后唤回桌面和旧预览设置清理,并加固迁移失败路径,避免把 0.9.1 历史或 #484 已合内容带进 V0.9.2。

Co-authored-by: fairy <3054158379@qq.com>

* fix(models): show display names in model switch notices (#482)

* fix(enterprise): keep the Learn more pill readable in dark theme

The hardcoded white background hid the label after the host switched text color. Use theme tokens and tidy the settings client so the control follows light and dark modes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): drop account from the English nav label

The settings sidebar should read Enterprise, matching the shorter product name.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enterprise): 将了解企业版链接改为官网企业部署页 (#495)

Co-authored-by: fairy <3054158379@qq.com>

* feat(enterprise): 在 V0.9.2 加入企业插件市场 (#519)

* feat(enterprise): add managed plugin market on V0.9.2

* fix(enterprise): enforce market runtime and lifecycle contracts

* test(enterprise): support signed test builds with desktop minimum 0.9.1

* feat(enterprise): 优化企业账号与模型列表布局 (#527)

* feat(enterprise): simplify account and model settings layout

* fix(enterprise): label displayed identity as current account

* fix(enterprise): point Learn more at the deployment page

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(test): drop the enterprise packer shebang so Windows CI can load it

Vite's SSR transform only strips LF hashbangs. A CRLF checkout leaves #! in the module and fails enterprise-market tests with a syntax error.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(startup): make recovery independent of profile links (#504)

* fix(ppt): avoid duplicate profile and desktop composition

* fix(startup): establish market baseline and isolate recovery boot

* fix(recovery): resolve agent presets from host installation

* fix(startup): resolve linked plugin host peers

* fix(startup): retry stale host peer subpaths and keep the original failure

Field crash reports show the host peer fallback missing its main case: a
plugin resolving an older copy of a @deepseek-ai package from the shared
Profile tree fails with ERR_PACKAGE_PATH_NOT_EXPORTED, not not-found. The
retry is safe because it only succeeds when the installation really exports
that subpath. Reports also lose `code` to the loader's wrapper, so the first
failure's "imported from <plugin>" is all that still names the faulty plugin;
the host retry now augments that error instead of replacing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(startup): keep recovery proportional to the fault it found

Two startup faults sent users to Safe Mode with no way out of it.

A bundle declared in the manifest but no longer installed fails the boot
preflight, and Safe Mode cannot clear it: disabling a plugin writes a patch
row, while the fault lives in dsh.profile.bundles. Startup now drops those
third-party declarations once and re-checks before giving up, and carries the
failing package name through so Safe Mode lists it. Core bundles, host
packages, package files, user patch rows and plugin data are never touched;
pnpm-lock.yaml is dropped so the next install re-resolves. This is a narrow,
declaration-only exception to "startup leaves destructive repair to recovery",
recorded in the module docstring and the architecture notes.

A market baseline that cannot be installed no longer blocks the boot on its
own. pnpm fetch failures, 404s and EPERM are ordinary on restricted networks
and account for roughly 130 field reports; startup only enters Safe Mode when
the market already in the profile is absent, unreadable or still owned by a
generation. The pending marker keeps the repair queued for the next launch,
and an unreadable marker no longer throws the boot away either.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore: guard the client anchor lookup and the fallback's packaging

The client-modules patch dereferenced ctx.loader without the optional chain
its paired agent-presets patch uses. host-module-fallback.mjs is a top-level
import of the Harness entry, so leaving it out of extraResources would stop
the entry loading rather than degrade the fallback; assert it is packaged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(enterprise): hide the trusted-source prompt after sign-in

Returning from the browser reopened the confirmation under an already connected account.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Jianghan <58623049+SuperstructureJH@users.noreply.github.com>
Co-authored-by: 姚劲 <yaoj.alex@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(startup): make recovery independent of profile links (#504)

* fix(ppt): avoid duplicate profile and desktop composition

* fix(startup): establish market baseline and isolate recovery boot

* fix(recovery): resolve agent presets from host installation

* fix(startup): resolve linked plugin host peers

* fix(startup): retry stale host peer subpaths and keep the original failure

Field crash reports show the host peer fallback missing its main case: a
plugin resolving an older copy of a @deepseek-ai package from the shared
Profile tree fails with ERR_PACKAGE_PATH_NOT_EXPORTED, not not-found. The
retry is safe because it only succeeds when the installation really exports
that subpath. Reports also lose `code` to the loader's wrapper, so the first
failure's "imported from <plugin>" is all that still names the faulty plugin;
the host retry now augments that error instead of replacing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(startup): keep recovery proportional to the fault it found

Two startup faults sent users to Safe Mode with no way out of it.

A bundle declared in the manifest but no longer installed fails the boot
preflight, and Safe Mode cannot clear it: disabling a plugin writes a patch
row, while the fault lives in dsh.profile.bundles. Startup now drops those
third-party declarations once and re-checks before giving up, and carries the
failing package name through so Safe Mode lists it. Core bundles, host
packages, package files, user patch rows and plugin data are never touched;
pnpm-lock.yaml is dropped so the next install re-resolves. This is a narrow,
declaration-only exception to "startup leaves destructive repair to recovery",
recorded in the module docstring and the architecture notes.

A market baseline that cannot be installed no longer blocks the boot on its
own. pnpm fetch failures, 404s and EPERM are ordinary on restricted networks
and account for roughly 130 field reports; startup only enters Safe Mode when
the market already in the profile is absent, unreadable or still owned by a
generation. The pending marker keeps the repair queued for the next launch,
and an unreadable marker no longer throws the boot away either.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore: guard the client anchor lookup and the fallback's packaging

The client-modules patch dereferenced ctx.loader without the optional chain
its paired agent-presets patch uses. host-module-fallback.mjs is a top-level
import of the Harness entry, so leaving it out of extraResources would stop
the entry loading rather than degrade the fallback; assert it is packaged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…fe Mode manager (#530)

* style(market): refine the installer card in settings

- round the dsh-market card to 20px
- merge the community and update notices into one sentence
- replace the repository text link with a secondary button that
  carries a GitHub icon and the shorter "View on GitHub" label

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* style(recovery): drop the header badge from the plugin recovery page

The "Startup recovery" pill next to the brand name is gone; the badge
text still feeds the window title.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(recovery): split the decision row and explain Safe Mode when it is the only option

- move the Safe Mode button to the left of the decision row; the primary
  action keeps its note on the right
- when no plugin or market can be repaired, hide the duplicate button and
  center the Safe Mode button with a note that says it deletes or changes
  nothing and can be exited at any time
- expose `safeModeOnly` on the view model so the page and its tests share
  the same rule

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* style(recovery): lay the plugin recovery page out full-window

Drop the centered card (border, radius, shadow, canvas backdrop) so the
recovery content fills the window on every size, with the footer pinned
to the bottom. The 46px top strip that keeps the header clear of the
hidden title bar's controls now applies everywhere instead of only below
620px.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* style(recovery): center the page content in an 800px reading column

Header, content, and footer keep their full-width dividers but pad
inline to max(edge padding, (100% - 800px) / 2), so everything aligns to
one centered column on wide windows and collapses to the edge padding on
narrow ones. The width is a fixed measure rather than a share of the
window so line length stays readable on large displays.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(recovery): lay the plugin recovery page out as a workspace

- fixed header and footer with only the plugin card scrolling; the
  generic failure caption above the list is gone and an empty list hides
  the card
- an 800px reading column centered under the header, with the quit
  button in the header and the community links centered in the footer
- recovery progress shows as a caption and thin bar under the heading
- "View technical details" sits beside the heading and opens a details
  column beside the content instead of an inline disclosure; the column
  is resizable from a hover-revealed handle that follows the pointer,
  remembers its width per viewer, and keeps the header aligned with the
  left column
- launch directory and error text live in a card that matches the plugin
  card; the log button and the per-plugin remove buttons share one
  neutral chip style in light and dark themes

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(safe-mode): keep the page responsive while the market check runs

- the registry lookup can remember a failure for a caller-chosen window,
  so reopening the Safe Mode page does not wait out the timeouts again,
  while an explicit retry still makes a fresh request
- the view model marks plugins as "checking for updates" until the
  market check answers, so the page can render before the result

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(safe-mode): show the manager inside the Harness pane and a card in the sidebar

- the Safe Mode page is served on a dsh-desktop:// origin and framed by
  the Harness page over its main pane, replacing the native overlay
  view: the sidebar stays usable, Harness modals stack above it, and the
  page opens immediately with the market check result pushed in later
- the page itself becomes a full-pane layout with a back button, a
  divider and a "Manage plugins" title aligned to the sidebar's logo
  row; the brand, badge and close button are gone and the quit button
  moved to the header
- the plugin list header is a select-all checkbox aligned with the row
  checkboxes, reflecting none, some (indeterminate) or all rows selected
- the Safe Mode banner moves from the top of the pane into the sidebar
  above the settings row as a card matching the sidebar's content width,
  collapsing to a compact indicator when the sidebar is narrow

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* style(sidebar): size the phone button like the settings trigger

The wide-sidebar phone button was a 32px square beside a 42px settings
trigger, so its hover highlight sat visibly shorter than its neighbour.
It now mirrors the trigger: a 42px square with the same 12px radius and
the same 2px overhang past the settings area's content edge, 4px from
the trigger. The collapsed rail mirrors the trigger's 36px circle, and
the connected dot moves inward to keep sitting on the icon's corner.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(recovery-ui): drive the smoke check with the Safe Mode frame

The recovery UI smoke check still imported the native SafeModeOverlay,
which the in-pane Safe Mode frame replaced, so its esbuild bundle step
failed on every CI run. The Safe Mode page now loads into the window the
way the recovery page does, the frame's IPC contract (show, in-place
update, idempotent close, close on parent destroy) is checked in its
place, and the recovery page's Safe Mode button is looked for across the
decision row, where it moved. The native-window thumbnail is skipped
instead of failing on a machine without screen-capture permission.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(recovery-ui): measure page edges against the exact viewport

At a fractional display scale the viewport is a fractional number of CSS
pixels (800 / 1.5 = 533.33). innerHeight rounds that down while the
bottom edge of a full-height page does not, so the footer check failed
on Windows at 1.5x although the page fits. Edges are now compared with
the visual viewport's exact size, with half a pixel of tolerance, and
every layout assertion names the variant and its measurements.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The editable built-in project path existed only for this template. Personal templates still copy through ppt_template_create_project, and a saved Green Pulse selection retires to the engineering blueprint.

Co-authored-by: fairy <3054158379@qq.com>
保留 Bisheng Work 的企业登录与品牌文案。

Co-authored-by: Cursor <cursoragent@cursor.com>
@Fairy-happy
Fairy-happy merged commit 0159f90 into main Sep 23, 2026
7 checks passed
@yaojin3616
yaojin3616 deleted the merge/dsh-main-into-bisheng branch October 1, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants