ModApi: Widget system & Footer
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
まず、エントリポイントの cmd.ui.widget()、w.update()、cmd.ui.setStatus() と、それらがデータを渡す TUI renderer を特定します。何も変更する前に、ウィジェットのレンダリング、ステータスバッジ、共有テーマ、ダブルバッファリングの範囲を定義します。要求された動作がちらつきなく機能し、mods から利用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Feature Description
Disclaimer: This message was synthesized by an AI from a long, unstructured Markdown file of notes accumulated while building real mods. Use cases have been kept intentionally simple and generic. If anything seems off or incoherent, feel free to ask for clarification.
1. cmd.ui.widget() — actually wired in the TUI
Problem: cmd.ui.widget() exists in the API and is used in community mods (e.g. David Thyresson's weather mod), but it's currently a no-op — the widget renders nowhere. The docs explicitly say: "Widgets are not wired into the TUI yet."
Use case: Any mod that wants to show persistent information above the editor (status, live counter, etc.) is currently blocked. The code exists; it just needs to be wired up.
2. w.update() — update a widget without recreating it
Problem: To update a widget's content, you have to .dispose() it and create a new one. This causes flickering and unnecessary boilerplate.
Use case: Any widget displaying live or periodically refreshed data needs to update its content without destroying and recreating the whole component.
const w = cmd.ui.widget({ render: () => ['loading...'] });
// later:
w.update(() => [`${count} items`]);
3. Structured cmd.ui.setStatus() with colored badges
Problem: setStatus() only supports plain text in the footer. No color, no icon, no badge styling.
Use case: A mod that tracks some state would benefit from a colored, iconified badge in the footer rather than unformatted text.
cmd.ui.setStatus([
{ text: 'active', color: 'green', icon: '●' },
{ text: '14 items', color: 'yellow', icon: '📦' },
]);
4. Theming / shared color palette across mods
Problem: Every mod hardcodes its own colors. There's no way to share a theme across multiple mods, or let the user customize the visual style.
Use case: An author publishing a set of related mods would want them to share a consistent visual identity without duplicating ANSI constants across every file. Users would benefit from being able to adjust colors to match their terminal theme.
#PART 2
4. Double-buffering — Flicker-free rendering
Problem: When a mod updates its display (widget refresh, status change, progress bar), the entire screen redraws character by character, causing visible flicker. This is the TUI equivalent of a 1995 web page. The user sees the screen flash on every update, which makes live data displays unusable.
Use case: A mod that updates a live counter or progress bar every second produces visible flickering that makes the interface feel broken. Double-buffering renders to an off-screen buffer first, then swaps atomically — zero flicker, smooth updates.
// Implicit — the TUI renderer handles it
// But needs to be enabled/wired at the framework level
cmd.ui.enableDoubleBuffer();
References: terminui (double-buffered by default — "renders to an off-screen buffer, then flushes to the terminal in one write"), Ratatui (full double-buffer with implicit flush — the standard for Rust TUIs), Ink (React reconciliation = implicit double-buffer via virtual DOM diffing). No modern TUI renders directly to stdout anymore. The old approach causes flicker because each character write triggers a terminal repaint.
Use Case
No response
Additional Context
No response
How important is this to you?
None
- 主要言語
- 言語のデータがありません
- スター
- 4k
- フォーク
- 350
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommandCodeAI/command-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#855 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CommandCodeAI/command-code#841 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#655 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#608 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
CommandCodeAI/command-code#893 ·
CommandCodeAI/command-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
milvus-io/birdwatcher#545 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area:tools bug good first issue help wanted priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
TaewoooPark/Motifcode#14 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
newrelic-experimental/preflight#793 · コメント 1 件 ·