@adamcjm/dsh-genui-bugfix: Fix DeepSeek Harness Table Rendering

When using DeepSeek Harness or processing dsh-ui tables, rendering issues often occur: long inline code blocks overflow into the next column, or the table is forced to widen to accommodate long text, necessitating horizontal scrolling. The adamcjm/dsh-genui-bugfix plugin aims to resolve these specific rendering issues, making table layouts behave as expected.

Core Features

This is a client-side plugin designed primarily to fix table rendering defects in dsh-ui:

  1. Fix Rendering Issues: Resolves dsh-ui table rendering anomalies.
  2. Prevent Text Overflow: Stops cell text containing inline code from overflowing into the next column.
  3. Auto-Wrapping: Enables long content to wrap automatically within cells instead of forcing the table to widen and requiring horizontal scrolling.

Installation and Activation

This plugin is an ordinary bundle for DSH and requires manual configuration of the profile’s dependencies and bundle list.

  1. Edit ~/.dsh/profiles/<profile>/package.json and add the package to dependencies:
    {
      "dependencies": {
        "@adamcjm/dsh-genui-bugfix": "^0.1.0"
      },
      "dsh": {
        "profile": {
          "bundles": ["…", "@adamcjm/dsh-genui-bugfix"]
        }
      }
    }
  1. Install dependencies:
    cd ~/.dsh/profiles/<profile> && pnpm install
  1. Restart the DSH application. DSH loads the plugin tree at startup; running instances will not automatically detect newly installed bundles.

Technical Principles

The plugin overrides upstream default behavior by injecting CSS rules. It operates on specific CSS Modules class name prefixes (such as tableWrap, inlineCode) to ensure the rules remain effective after plugin upgrades.

  • For Inline Code: Forces white-space: pre !important to prevent layout misalignment caused by code blocks wrapping.
  • For Standard Cells: Forces white-space: normal !important and overflow-wrap: anywhere to allow content to wrap automatically.

Verification and Notes

  • Verification: After restarting DSH, check in the browser console:
    document.getElementById('dsh-genui-bugfix/table-overflow')
If a non-empty element is returned, the plugin is active.
  • Notes:
    • This plugin only affects cells containing inline code; pure text cells are not affected.
    • The plugin contains two rules, of which the “allow cell wrapping” rule (Rule 2) is optional. If you prefer the upstream behavior (table widening with scrolling allowed), you can remove the relevant CSS rules in lib/client.js.
    • The plugin is applicable to version @changfenhuang/dsh-genui 0.11.x and can be used without waiting for an upstream release.

Plugin Directory | GitHub Repository

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

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

Xiaoye