douglarek/dsh-3d-pinball: A 3D Pinball machine in the DeepSeek Harness sidebar

Preface

The DSH interface is a combination of host and plugins: the left side has panels for plugins, tasks, statistics, etc., and the right side is the session. This is likely the default view when writing code or running tasks for a long time. When you need to briefly step away from the current session to think about other things, or just want to kill two minutes while waiting for a build, adding a playable mini-game to the interface is a natural idea, but this usually means opening a separate window or switching to a web page. The plugin introduced below puts this game directly into the Harness sidebar.

douglarek/dsh-3d-pinball is a 3D pinball table in the style of Full Tilt! that runs as a DeepSeek Harness sidebar panel plugin, maintained by douglarek. It solves the problem of “providing a casual entry point within the Harness interface that doesn’t require leaving the current context,” involves no external art assets, and requires no build steps.

What is it

A pinball table mini-game. A new pinball table icon entry is added to the sidebar. Upon clicking, the middle column becomes a fully playable pinball table, including the launch lane, top orbit, bumpers, flippers, drop targets, and dual flippers, complete with scoring, multipliers, and sound effects. The visuals are entirely drawn on Canvas 2D in real-time; there is no separate window and no external asset loading.

This is an original implementation, with gameplay and visuals paying tribute to classic arcade pinball; it does not contain or distribute any original game assets and has no affiliation with Microsoft / Cinematronics / Maxis.

Core Features

The plugin registers two entries simultaneously: the pinball table icon in the sidebar and the full-screen panel in the middle column (panel key pinball), the latter being on the same level as Plugins, Tasks, and Statistics.

The physics and gameplay parts support gravity, line segment and circle collision, angular velocity transfer of moving flippers, one-way gates, and anti-ball-stuck protection. The table is configured with 3 plunger lanes, 2 bumpers, and 3 drop targets (completing a set adds +1 multiplier, max ×5), featuring power launching, ball loss judgment, 3-ball games, and high score recording. Sound effects are synthesized using WebAudio and can be muted; game scores are preserved after switching panels.

Operations support both keyboard and pointer: Left and Right arrow keys control the left and right flippers, Space bar charges and launches; you can also tap the left or right half of the canvas. Tapping the canvas while in the ready state charges and launches. The language follows the bilingual English/Chinese setting in Harness, and the container and controls use only the host’s --dsw-alias-* theme variables.

Installation and Enablement

On the Harness Plugins page, select “Install from GitHub” and enter:

github:douglarek/dsh-3d-pinball

Or use the CLI distributed with Harness:

dsh plugin --profile <profile> install github:douglarek/dsh-3d-pinball

After installation, a pinball table icon appears in the sidebar; click it to start. Uninstallation is done by removing the bundle on the Plugins page.

Controls

Action Keys
Left Flipper ← / Z
Right Flipper → / /
Charge and Launch Hold Space, release to launch
Pause / Resume P
Mute M
Restart after game over Enter

Typical Implementation and Compatibility

The plugin is small and the source code structure is clear, making it suitable for those who want to read a complete DSH plugin example:

  • index.js — Host half-side, no service registration, is a pure UI plugin.
  • client.js — Browser half-side: physics engine, Canvas rendering, React panel, Slot registration (main#pinball and sidebar.panellist#pinball).
  • locale/{en,zh}.json — Plugin display metadata; panel text is registered via ctx.locale.register inside client.js.
  • icon.svg — Plugin list icon.

Panel and sidebar icons are registered via ctx.slots.inject and ctx.slots.register. Styles are removed when the component is unmounted, and keyboard listeners are removed during useEffect cleanup.

Regarding compatibility, the plugin relies on Harness’s slot contracts main and sidebar.panellist, as well as window chrome variables published by layout. On earlier versions, if these two slots do not exist, the plugin will not render and will not throw errors that affect other panels.

On macOS, there is an additional layer of window button avoidance handling: the panel title and toolbar are in the same header. Following Harness’s window chrome contract, padding is reserved and only takes effect under html[data-platform='darwin']. padding-top stacks with --dsh-frame-top-clearance (48px, window top strip), padding-left stacks with --dsh-frame-leading-clearance (160px when sidebar is collapsed, 84px in native full screen), and data-window-drag is marked to make the blank area draggable for the window. When opened in a browser, these two variables do not exist, so the padding is 0 and the layout is not affected.

Use Cases and Notes

Suitable for developers who want to add a small gadget to the Harness interface, and also serves as an example for understanding the DSH plugin structure: it simultaneously demonstrates host-side injection, browser-side rendering, slot registration, theme variables, locale registration, and window chrome contracts.

It is worth noting that the plugin runs with the permissions of the current DSH process; you should check the repository source code and license before installing. It is categorized under “Fun Gadgets” and does not affect the operation of your other plugins, but do not expect any production-grade guarantees. The license is MIT.

Conclusion

What this plugin does is very simple: place a usable pinball table in the sidebar, click to play. For the DSH ecosystem, it demonstrates a direction beyond the plugin mechanism—the host’s interface can also carry some unserious functions.

Plugin Directory Page: https://www.skillhub.cn/plugins/douglarek/dsh-3d-pinball

GitHub: https://github.com/douglarek/dsh-3d-pinball

羽毛球分组比赛记分
小程序二维码

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

Xiaoye