dsh-boot-compass: Catching the First Frame of the Boot Animation Before the DSH Loading Card

Introduction

When the DeepSeek Harness (DSH) desktop client starts, a loading card that says “HARNESS is loading plugins…” appears first. This screen shows up during the gap between document parsing, shell process startup, and assembling plugins into the main interface—before it’s ready. It is hard for developers to grab an earlier frame in a business plugin.

If you want that waiting time to have a unified visual opening instead of the default loading card, dsh-boot-compass takes over the first frame: it covers the loading card with a pure CSS overlay, plays a five-stage compass sequence, and then hands off to the main UI. The implementation does not rely on video resources, and it has no additional runtime dependencies. The community catalog SkillHub classifies it as “cosmetic flair”; the maintainer is linshufan21, and the repository currently has about 1 star.

The following sections describe the problem it solves, how to install it, and the edge cases you should be aware of when using it.

What Is This

In one sentence: it does not draw DSH’s business UI; instead, it takes up space in the served document as early as possible and takes over the first frame on the startup chain.

The plugin injects styles and scripts into the served HTML through the composition layer: the first frame is a pure CSS overlay from html.dshboot-on::before, which is already in place earlier than client-side plugins; the subsequent boot screen is mounted inside a shadow root and does not modify DSH’s original DOM. After the five stages finish, if the main UI is ready it takes over immediately; otherwise it stays in the “Stable Hold” waiting state, up to 12 seconds.

It explicitly does not: provide a settings UI, register client-side modules, modify theme packages, install dependencies, or read user data. After being disabled or uninstalled, DSH reverts to the default loading experience.

Core Features

First Frame and Handoff

  • The overlay is already on screen before the loading card is drawn.
  • The total duration defaults to about 4.5 seconds (adjustable via localStorage, see below).
  • The animation uses only transform, opacity, and filter; when the system enables “reduce motion,” it degrades to a crossfade, while the progress indicator remains.

Five-Stage Compass Sequence

The stage names in the README are:

Core Wake ── Ring Expand ── Orbit Converge ── Energy Sync ── Stable Hold

The compass starts from a taut state; a bright arc sweeps the scales, the pointer un-ties and swings back to stop; the final beat holds still and waits for the main UI to take over (it does not end with a “shockwave pushes the camera away” style ending). The choreography is the same under a light theme, with a background color of #F6F7FB, and you can also force light mode via a toggle.

Skip and Waiting

  • Clicking the screen, or pressing Esc / Space / Enter, can advance the timeline to the release point and complete the handoff within about 0.6 seconds (it still plays the remaining release-related beats, not a hard cut).
  • If the main UI is not ready, the animation stops at “Stable Hold”; the ready gate waits up to 12 seconds.

Replay When Reopening the Window (Windows)

Starting from DSH 0.2.0, when you open the window again from the system tray, the startup animation can replay. The plugin does not rely solely on document.hidden (alt-tab being covered can also cause hidden); on Windows it queries IsWindowVisible / IsIconic through the host FFI to distinguish “truly hidden” from “just covered.”

  • replay defaults to window: minimizing then restoring, or minimizing to the tray then reopening, will replay; being covered by other windows then switching back will not.
  • The window must leave the visible state for longer than replaymin (default 600 ms) to trigger it; the host samples about every 250 ms.
  • On macOS / Linux the replay logic does not take effect; the startup animation itself is still available.

Cold-Start First Frame May Stutter Slightly

On the first cold start, the first one or two beats may not feel responsive enough. The README explains that the reason is contention for the main thread between the mounting tasks (creating the shadow root, injecting a large amount of CSS rules and registering animations) and DSH’s own startup, not the script size itself. After you close and reopen the window, the page is already running, and replay looks the same as the first play. You can alleviate it by shortening total, clicking to skip, or setting mode = 'off'.

Installation and Activation

Requires DSH >= 0.2.0-rc.1 and < 0.3.0 (in package.json under dsh.engines.dsh); the tested versions listed in the README include 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-rc.1, and 0.2.1-rc.2. Node >= 20. License MIT.

Desktop Client

Sidebar → Plugins → Add plugin, enter:

dsh-boot-compass

You can also use:

github:linshufan21/dsh-boot-compass

After installation, click Enable now, and then fully exit the client and reopen it. The boot animation is injected at process startup; refreshing the page alone will not show the effect.

Other Profiles (Command Line)

The desktop profile can only be managed by the Electron host; the CLI will reject --profile desktop. For other profiles:

dsh plugin --profile <name> add dsh-boot-compass

This command writes the composition bundle into the profile’s dsh.profile.bundles and enables it. It takes effect after restarting the corresponding profile.

Updates

On the client’s plugin page, click “Update”; you do not need to uninstall and reinstall. The README reminds you that within 24 hours after publishing, pnpm’s “new-version cooldown” may cause installations without a version number to silently revert to the old version. You can wait 24 hours, or in the desktop profile enter $DSH_HOME/profiles/desktop and run pnpm add dsh-boot-compass@<version>. After updating, you also need to fully exit and reopen.

Typical Usage

localStorage Switches

After making changes, refresh the page; to see injected changes, in most cases you still need to restart the profile / fully exit the client.

localStorage.setItem('dsh-boot-compass:mode', 'off')       // Turn it off entirely, go straight into DSH
localStorage.setItem('dsh-boot-compass:theme', 'light')    // Force light theme; default follows the system
localStorage.setItem('dsh-boot-compass:total', 2000)       // Total duration, 800–12000 milliseconds
localStorage.setItem('dsh-boot-compass:replay', 'window')  // Replay: window (default) / any / off
localStorage.setItem('dsh-boot-compass:replaymin', 5000)   // How long to be away counts as "reopening", default 600
  • mode only accepts 'off'.
  • If total exceeds 800–12000, it is ignored and reverts to the default 4500.
  • With replay = 'any', replay follows the web page hidden rule, and being covered will also replay (on non-Windows platforms, if you need similar behavior you can use this option).

Console Debugging

__dshBoot.replay()   // Play it again immediately, no need to repeatedly close and reopen
__dshBoot.stats()    // Play count, last non-replay reason, host response, etc.

Host Read-Only Route

Other plugins or scripts can query the window state:

GET /__boot-compass/window
→ {ok, visible, iconic, epoch, kind, at, hiddenFor}

epoch increases on “truly reopening” and can be used as a basis for replay decisions.

Local Preview (Without Modifying DSH)

The repository contains tools/preview.html, a single-file preview whose content matches the host injection; you can click to try skipping, and adding ?replay=1 can simulate replay detection.

Suitable Scenarios and Notes

Who it is for: Users who want a unified startup feel in the DSH desktop client and are willing to replace the default loading card with a few seconds of opening animation; they accept a pure front-end animation approach with no extra dependencies.

Permissions and trust: The plugin runs with the permissions of the current DSH profile process; its declared permissions include web:index-inject, dom:overlay, browser:local-storage, desktop:titlebar-overlay, etc. Before installation, you should read the source code and cordis.patch.yml on the GitHub repository and confirm they match your security policy.

Platform differences: The startup animation is available on Windows / macOS / Linux; the “close and reopen” replay detection is Windows-only. If it cannot recognize the startup card, it will still finish playing and hand off within up to 2 seconds, and will not hang until 12 seconds.

Ecosystem note: DSH advocates “everything is a plugin”; SkillHub is a community catalog site and is not officially affiliated with DeepSeek / HuanChang.

Uninstall: To temporarily disable it, use mode = 'off'; to remove it completely, uninstall it on the desktop plugin page, or run dsh plugin --profile <name> remove dsh-boot-compass.

Conclusion

dsh-boot-compass replaces the default loading card during DSH’s startup gap with a configurable compass opening: the first frame is grabbed early with CSS, the main part plays a five-stage sequence inside a shadow DOM, and then it connects with the main UI. The installation command is dsh-boot-compass or github:linshufan21/dsh-boot-compass; after enabling it, remember to fully restart the client.

  • Catalog page: https://www.skillhub.cn/plugins/linshufan21/dsh-boot-compass
  • GitHub: https://github.com/linshufan21/dsh-boot-compass
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye