Skip to content
dsh.fish
Bundle

dsh-web-attention-badge

Web attention badge: a top-left corner indicator counting sessions waiting for user input or finished-but-unopened, plus a browser tab title prefix

Source
nbfys
stars
1 stars
License
MIT
Updated
Updated 5 days ago

Readme

# dsh-web-attention-badge (enhanced)

[English](README.md) | [简体中文](README.zh-CN.md)

> **Fork with customizations.** This repository is a modified copy of
> [Luaphes/dsh-web-attention-badge](https://github.com/Luaphes/dsh-web-attention-badge)
> (MIT, © Luaphes). All original behavior is preserved; the deltas are
> documented below under [Custom modifications](#custom-modifications).

Attention reminders for the DeepSeek Harness Web UI. Whenever a session needs
you, three surfaces light up at once: a `(1)`-style badge in the top-left of
the frame, a `[Waiting]`/`[Done]` prefix in the browser tab title, and a
recolored whale favicon.

- **Amber** — sessions waiting for your input (`ask_user` question, approval
  prompt, plan-mode review). Tab title shows `[Waiting]`.
- **Green** — sessions that finished while you were away and have not been
  opened yet, **plus the currently-selected session right after its turn ends
  (running → idle)**. Tab title shows `[Done]`.

All three share the same counts from the built-in sessions store — no host
code, no extra transports. The badge is click-through and never blocks the
sidebar.

## Custom modifications

Relative to upstream `v0.3.2` (all changes are inside `lib/client.js`):

1. **`[Waiting]` / `[Done]` tab-title prefixes** instead of the upstream
   `(N)` count. `[Waiting]` when any session awaits user input (top priority),
   else `[Done]` when any completion reminder exists.
2. **Current-session completion tracking** (`currentDoneIds` / `prevRunningById`):
   the host `completed` flag only arms for *non-selected* sessions, so the
   selected session's running→idle edge is mirrored here — you now get `[Done]`
   for the session you are actively watching. Cleared on a new running edge or
   when the session stops being current (the host takes over).
3. **Acknowledged reminders** (`acknowledgedDone`): the host `completed` flag
   only clears on a new running edge, so returning to a finished session would
   leave a stale `[Done]`. Visiting the session now marks its reminder as seen
   — it stays hidden until the next running edge resets it.

Install / tuning / license are identical to upstream (see below).

## Install

```sh
dsh plugin --profile web add dsh-web-attention-badge
```

Or install straight from GitHub:

```sh
dsh plugin --profile web add "github:Luaphes/dsh-web-attention-badge#v0.3.1"
```

Upgrade / uninstall:

```sh
dsh plugin --profile web update dsh-web-attention-badge
dsh plugin --profile web remove dsh-web-attention-badge
```

`dsh plugin` registers the bundle automatically — no manual config.

## Tuning

Constants at the top of `lib/client.js`:

- `TAB_TITLE_ENABLED` — the `[Waiting]`/`[Done]` browser tab title prefix.
- `FAVICON_ENABLED` — the whale-favicon recolor.
- Pill colors/position — the `style` maps in `AttentionBadge` / `Pill`.

Bundle edits apply on a page refresh; manifest edits need a `dsh web`
restart.

## License

[MIT](LICENSE) — original work © Luaphes; this fork's modifications are
licensed under the same MIT terms. See the upstream repository for the
original copyright notice.

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for layout, release and publishing.

Install

dsh plugin --profile web add github:nbfys/dsh-web-attention-badge-enhanced

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source