dsh-float-panel: DSH Task Floating Panel

Introduction

In agent development, it’s easy to switch to another application after kicking off a task and forget what the AI is currently doing, or miss a step that requires approval or input. The DSH plugin dsh-float-panel provides a system-level always-on-top mini window that displays task status, real-time steps, approval buttons, and a completion preview—keeping task progress and action entry points always visible.

What Is This

dsh-float-panel is a DSH client plugin developed by FlowRiver1. It uses native windows (NSPanel + WKWebView on macOS, WPF + WebView2 on Windows) to render a card-style floating window at the topmost layer of the system. It subscribes to task status via DSH’s session/event events, then pushes state updates to the floating panel through web-side routing. The panel only displays the one session that “needs your attention most right now” (approval > question > in-progress > completed); all other sessions are reduced to a count.

Core Features

Status & Step Display

  • While a task is in progress, shows a top status dot + real-time steps like “Running Bash: npm test”
  • When a task checklist exists, displays a progress bar and a subtitle (e.g., 3/7 · Writing fix patch)
  • Upon completion, the status changes to “Completed” and shows a two-line preview of the result

Approval & Answer

  • Approval prompts show “Allow once / Deny” buttons directly on the panel; clicks take effect immediately
  • Single-choice questions present option buttons—click to submit
  • Questions requiring free-text input do not offer an editor; instead, a “Go answer” link takes you back to DSH

Session Activation

  • After completion, click “Open to view result” to activate DSH and jump to that session in one click
  • The window is draggable and remembers its position; height adjusts to content and won’t keep growing

Installation & Enablement

Prerequisites

  • macOS 13+ or Windows 10 1903+ / Windows 11
  • DSH >=0.2.0-rc.2
  • Windows requires the WebView2 Runtime (pre-installed on Win11 and most Win10 machines)

Install Command

dsh plugin --profile web add github:FlowRiver1/dsh-float-panel

After installation, restart DSH. You’ll see dsh-float-panel under Settings → Plugins.

Configuration

Add the following to your DSH plugin configuration:

- insert:
    - id: float-panel
      name: 'dsh-float-panel'
      config:
        autoOpen: true   # Automatically show the panel when a task starts

For local development or quick testing, you can install via a local path so code changes take effect immediately:

dsh plugin --profile web add link:/path/to/float-panel

Typical Usage

  1. After sending a request, the panel automatically appears in the bottom-right corner and can be dragged anywhere
  2. Window height adapts to content: 57pt when empty, ~80pt while in progress, ~140pt with approval buttons
  3. The × in the top-right of the panel only closes the window without interrupting the task; the “◍ Task Panel” button in the bottom-right of the DSH interface remains available
  4. Completed tasks are retained for 30 minutes; click “Open” to dismiss them from the panel

Architecture

index.js          Host half: folds session/event into panel state, serves /float-panel/* routes
client.js         Page half: reports current session, executes panel-sent approval/answer/open actions, bottom-right wake button
panel.html        Panel page (dark card; macOS uses WKWebView bridge, Windows uses WebView2 bridge)
native/main.swift     macOS native shell: NSPanel + WKWebView
native/windows/       Windows native shell: WPF + WebView2
cordis.patch.yml      Loader entry inserted into the profile at install time

The Host is the single source of truth for state. It subscribes to session/event (turn/start, tool/call, todo/write, approval/asked, turn/end, …) so the panel stays accurate even if the DSH page is in the background or not open at all. The page half handles only three things: telling the Host which session is currently in view, translating panel clicks into actual answer() calls, and switching sessions when it receives an “open” directive.

Routing

All routes are served on DSH’s existing web port—no extra listeners are opened:

Route Purpose
GET /float-panel/panel?t= The panel page itself
GET /float-panel/state?t= Panel state snapshot (polling fallback)
POST /float-panel/action?t= Approval / answer / open from the panel
GET /float-panel/events SSE: state push and directive delivery
POST /float-panel/panel/open · /panel/close Launch / close the native panel
POST /float-panel/current Page reports current session

The panel / state / action routes require a 32-character random token (stored at ~/Library/Application Support/dsh-float-panel/token on macOS with 0600 permissions; at %LOCALAPPDATA%\dsh-float-panel\token on Windows). The events, current, and panel/open routes only accept localhost connections and validate the Origin header.

Native Shell Build

The repository ships with pre-built universal binaries for macOS (Apple Silicon + Intel) and DSHFloatPanel.exe for Windows. Standard installation does not require compilation. Rebuild is only needed if you modify the corresponding source code.

macOS (native/main.swift):

cd native && ./build.sh

Output: native/DSH Float Panel.app (universal, arm64 + x86_64, ad-hoc signed, LSUIElement so no Dock icon).

Windows (native/windows/Panel.cs):

powershell -ExecutionPolicy Bypass -File native/windows/build.ps1

Output: native/windows/DSHFloatPanel.exe (~24 KB) plus WebView2 SDK assemblies in the same directory.

Limitations & Notes

  • The panel requires a system native window: available on macOS 13+ and Windows 10 1903+ / 11; on Linux, only the in-page wake button within DSH is available
  • Windows requires the WebView2 Runtime; if missing, the panel won’t appear—a dialog will prompt you to install it, but the task itself is unaffected
  • Answers that require free-text input are not editable in the panel; only a “Go answer” link is provided to return to DSH
  • Approvals must be settled by the page, so panel clicks require the DSH page to have been opened at least once (the desktop app satisfies this by default)
  • The panel only shows the one session that “needs your attention most right now”; others are reduced to a top +N count

Privacy

  • The plugin only reads local DSH session status events and renders the results in the panel; no data is sent to any external service—no telemetry, no analytics
  • All routes are served on DSH’s own web port with no additional listeners
  • Runtime state files such as the token, panel.pid, and window position are stored in the state directory (macOS: ~/Library/Application Support/dsh-float-panel/; Windows: %LOCALAPPDATA%\dsh-float-panel/) and are not committed to the repository

Use Cases

Ideal for DSH users who need continuous visibility into agent task progress, frequently require approvals or answers, and want to minimize window-switching overhead. The plugin runs with the current dsh process permissions—review the source code and license before installing.

Summary

dsh-float-panel consolidates task status and action entry points into a single always-visible mini window via a native shell, enabling approvals, answers, and result viewing to be completed directly from the panel and reducing window-switching costs. The plugin has no external service dependencies—all state reads and interactions happen locally—making it well-suited for privacy-conscious and stability-focused agent development workflows.


  • Directory page: https://www.skillhub.cn/plugins/FlowRiver1/dsh-float-panel
  • GitHub: https://github.com/FlowRiver1/dsh-float-panel
羽毛球分组比赛记分
小程序二维码

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

Xiaoye