fix: overlay rendering — vertical alignment, line artifact, and duplicate class members

Overlay renderer (xterm-zerolag-input):
- Add charTop/charHeight to CellDimensions and RenderParams for precise
  vertical text positioning matching xterm's canvas renderer
- Convert device.char dimensions to CSS pixels via devicePixelRatio
- Extend line div background 1px past cell boundary to cover compositing
  seam between overlay layer (z-index:7) and canvas layer below
- Remove -webkit-font-smoothing/text-rendering overrides that made overlay
  text thinner than canvas text
- Add per-span height/lineHeight for natural CSS vertical centering
- Add setPrompt() method for runtime prompt strategy switching (fixes tab
  switching crash with "setPrompt is not a function")

app.js duplicate class members:
- Remove dead formatTokens duplicate (line ~5590 shadowed precise version)
- Remove fire-and-forget resetCircuitBreaker duplicate (shadowed notification version)
- Rename mux-panel killAllSessions to killAllMuxSessions (was shadowing
  Codeman session killer, breaking Ctrl+K)

Other:
- Update index.html onclick to use killAllMuxSessions
- Add getTeamTasks mock to test route context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-03-01 16:27:40 +01:00
co-authored by Claude Opus 4.6
parent 3915f4ea9d
commit e8fd358923
7 changed files with 60 additions and 29 deletions
@@ -380,6 +380,20 @@ export class ZerolagInputAddon implements XtermAddon {
this._bufferDetectDone = true;
}
// ─── Prompt configuration ──────────────────────────────────────────
/**
* Change the prompt detection strategy at runtime.
* Call this when switching between CLI modes (e.g., Claude Code vs OpenCode)
* that use different prompt characters.
*/
setPrompt(finder: PromptFinder): void {
this._options.prompt = finder;
this._lastPromptPos = null;
this._lastRenderKey = '';
if (this._pendingText || this._flushedOffset > 0) this._render();
}
// ─── Prompt utilities ─────────────────────────────────────────────
/**
@@ -531,7 +545,7 @@ export class ZerolagInputAddon implements XtermAddon {
return;
}
const { width: cellW, height: cellH } = dims;
const { width: cellW, height: cellH, charTop, charHeight } = dims;
const totalCols = this._terminal.cols;
const offset = this._getPromptOffset();
const startCol = activePrompt.col + offset;
@@ -581,6 +595,8 @@ export class ZerolagInputAddon implements XtermAddon {
totalCols,
cellW,
cellH,
charTop,
charHeight,
promptRow: activePrompt.row,
font: this._font,
showCursor: this._options.showCursor,