DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

adamcjm /

adamcjm/dsh-genui-bugfix

Verified

DeepSeek Harness plugin: fixes dsh-ui table cells painting text over the next column, and wraps long cells instead of forcing a horizontal scrollbar.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@05967616

@adamcjm/dsh-genui-bugfix

A DeepSeek Harness plugin that repairs dsh-ui table rendering:

  • cells no longer paint their text over the next column — the bug where a long run of inline-code chips bleeds across the column boundary;
  • long cells wrap instead of stretching the table until it needs a horizontal scrollbar.

It applies to the shipped @changfenhuang/dsh-genui 0.11.x and does not wait for an upstream release. Once upstream ships its own fix, this plugin stays harmless and can simply be removed.

What it fixes

dsh-ui table cells default to white-space: nowrap (the plugin's deliberate "data columns do not fold" voice). Meanwhile the host shell renders message bodies inside a .markdown subtree, and two rules from that sheet land on dsh-ui output because the components render in the same subtree:

.markdown { overflow-wrap: anywhere; }                 /* inherited by every cell */
.markdown :not(pre) > code { display: inline-flex; }   /* every chip becomes an atomic inline box */

Add the plugin's own .inlineCode { white-space: pre-wrap } and the chip's automatic minimum size collapses: the column may be sized below its own content, while the cell's nowrap still paints the text unbroken — straight over the neighbouring column.

Only cells containing inline code are affected. A pure-text cell is nowrap, so its min-content already equals its content width and the column can never be sized below it.

Measured on a live DSH desktop page (7 tables): on 0.11.4, 4 tables and 12 cells overflowed, the worst single cell by 704px.

The two rules it injects

/* 1) Table chips must not re-open line breaking — this is the root cause. */
[class*="tableWrap"] table [class*="inlineCode"] { white-space: pre !important; }

/* 2) Single-line data cells wrap — long content no longer stretches the table. */
[class*="tableWrap"] table td:not([class*="tdMultiline"]):not([class*="tdCode"]),
[class*="tableWrap"] table th:not([class*="tdMultiline"]):not([class*="tdCode"]) {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

The selectors use only CSS Modules class-name prefixes (tableWrap, inlineCode, tdMultiline, tdCode), never the build-time hash, so they survive plugin upgrades.

Rule 2 is a preference. Remove that block from lib/client.js if you would rather keep the upstream behaviour of a wider table plus horizontal scrolling.

Geometry verification

The same browser fixture, in an 801px container:

Styles Table width Horizontal scroll Cross-column bleed
upstream 0.11.4 (unfixed) 1471px yes 4 cells, worst 306px
upstream main (fix #282) 1777px yes none
this plugin 799px no none

In other words: the upstream repair makes the table wider and asks you to scroll; this plugin lets the long content wrap, so the table fits the conversation column.

Install

The plugin is an ordinary DSH bundle: a dependency in a profile, plus one entry in that profile's bundle list.

From npm

  1. Add it to the profile you want it in — ~/.dsh/profiles/<profile>/package.json:

    {
      "dependencies": {
        "@adamcjm/dsh-genui-bugfix": "^0.1.0"
      },
      "dsh": {
        "profile": {
          "bundles": ["…", "@adamcjm/dsh-genui-bugfix"]
        }
      }
    }
    
  2. Install it:

    cd ~/.dsh/profiles/<profile> && pnpm install
    
  3. Restart the DSH app. The host-side plugin tree is assembled when the process starts, so a running instance will not pick up a new bundle.

If pnpm refuses the freshly published version because of a minimum-release-age policy, add the package name to minimumReleaseAgeExclude in that profile's pnpm-workspace.yaml.

From a local checkout

Use a link: path instead of the version, for example "@adamcjm/dsh-genui-bugfix": "link:/path/to/dsh-genui-bugfix", then run the same two steps.

Verify

After a restart the renderer carries one extra stylesheet:

document.getElementById('dsh-genui-bugfix/table-overflow')   // non-null once loaded

Visually: tables with long inline-code runs no longer print text over the next column, and their width matches the conversation column instead of scrolling.

Without DSH running you can still check both halves against the loader contract:

cd <plugin> && npm test

Uninstall

  1. Remove @adamcjm/dsh-genui-bugfix from the profile's dependencies and bundles;
  2. pnpm install;
  3. restart DSH.

Relation to the upstream fix

  • Upstream main already fixes the overlap itself (PR #282, not yet released). Rule 1 here has the same effect and coexists with it — both keep the chip at white-space: pre.
  • The upstream browser fixture cannot catch that regression: its cross-column assertion is vacuously true because the fixture renders tables outside the host .markdown cascade. See issue #285 and PR #286.

Layout

@adamcjm/dsh-genui-bugfix/
├── package.json        # dsh.bundle.patch + dsh.client declarations
├── cordis.patch.yml    # inserts one plugin row into the profile
├── lib/
│   ├── index.js        # host half: node ESM, exports name/apply/inject, no behaviour
│   └── client.js       # browser half: window.__ModuleLoader__.load({ id, factory })
├── test/verify.mjs     # zero-dependency self-check of the loader contract
└── README.md

Both halves follow the shapes already used by shipped plugins:

  • the host half is plain node ESM exporting name / apply / inject — the same shape as the host half of dsh-window-drag-probe, which also has no host-side behaviour;
  • the client half must be the pre-bundled form DSH serves to the renderer, window.__ModuleLoader__.load({ id, factory }), where factory returns the exports carrying apply — the same shape as the client artifacts of @changfenhuang/dsh-genui and dsh-boot-animation. A plain ESM export function apply is not loaded, and it fails silently rather than reporting an error. This plugin has no runtime dependencies, so its factory never needs require.

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 05967616df15

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout