[Bug]: bare /loopx renders the whole command-pack preview as a persistent widget — TUI truncates it and it covers the working indicator
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 72/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- developer-experience
Piste de recherche
Le widget est défini dans inspectLoopx() dans loopx/pi_goal_mode/loopx-goal.ts, qui appelle ctx.ui.setWidget("loopx", ...) avec packet.message brut tronqué à 24 lignes. Lis docs/tui.md pour setWidget et le placement, puis remplace le texte brut par un résumé de trois lignes construit à partir de goal_id, project_connection.connection_state et recommended_next_step.summary. C'est terminé lorsque un simple /loopx affiche un widget belowEditor court, que le texte complet arrive toujours dans l'entrée loopx-packet et que le widget est effacé à session_shutdown.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bare /loopx dumps the whole command-pack preview into a persistent widget — the TUI truncates it and it covers the working indicator
Affected version: Pi surface installed from release 20261010T034436Z (loopx/pi_goal_mode/loopx-goal.ts, installed as ~/.pi/agent/extensions/loopx/index.ts).
Host surface: pi
Impact: running bare /loopx (or /loopx status) paints a large block of raw packet text above the editor. The widget area can only render a few lines, so it ends mid-sentence with … (Widget truncated) and overlaps the working indicator, which looks like a rendering bug to the user. The same text is already persisted as a session entry, so the widget adds noise rather than information.
Code
// loopx/pi_goal_mode/loopx-goal.ts — inspectLoopx()
const display = typeof packet?.message === "string" ? packet.message : stdout
ctx.ui.setWidget("loopx", display.split("\n").slice(0, 24))
ctx.ui.notify("LoopX packet ready (widget above the editor).", "info")
pi.appendEntry("loopx-packet", { text: display })
packet.messageforbootstrap-command-packis the full multi-section preview (project / goal id / detected state / aRules:list with several long bullet lines) — dozens of lines, and individual lines are wider than a terminal.setWidgetis documented as "Persistent content near the editor" (docs/tui.md), i.e. a fixed-height area; slicing at 24 lines does not make the content fit, it just chops it.- The widget is never cleared: it stays through subsequent turns and only disappears at session end, so a stale packet preview keeps floating over the editor.
Reproduction
- Connect a project to a goal (registry + active state file present).
- Run bare
/loopx(status/inspect path). - Observe the truncated multi-line block above the editor and the working indicator behind it.
Suggested fix
- Render a compact status summary from the structured packet fields instead of the raw message, e.g.
goal_id,project_connection.connection_state,recommended_next_step.summary— three short lines with a width clamp. - Use
placement: "belowEditor"(orctx.ui.setStatus()for a single line) so it cannot cover the working indicator. - Keep the full text in the existing
loopx-packetsession entry (already done viaappendEntry). - Clear the widget with
setWidget("loopx", undefined)onsession_shutdownand when a goal start packet is rendered, so a stale preview cannot linger.
Local interim patch
I already patched the installed copy: the widget now renders three clamped lines (LoopX · <goal_id> / state: <connection_state> · <project basename> / next: <summary>) with placement: "belowEditor", the full packet still lands in the loopx-packet entry, and the widget is cleared on session_shutdown and on /loopx <goal>. Verification harness (same jiti loader Pi uses, mock pi API):
4) widget lines: 3 | placement: belowEditor | max width 96
"LoopX · dfc-ai-knowledge-goal"
"state: connected · dfc-ai-knowledge"
"next: Project is connected; show status, then generate the heartbeat prompt only if the user wa…"
- Langage dominant
- Python
- Étoiles
- 6.2k
- Forks
- 596
- Merge moyen
- 6 h 9 min
- PR mergées (30 j)
- 940
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de loopx-project/loopx
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
loopx-project/loopx#6842 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
loopx-project/loopx#5688 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
loopx-project/loopx#5632 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
loopx-project/loopx#5443 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
loopx-project/loopx#5026 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de loopx-project/loopx
Issues similaires
-
Project submission:Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
slavakurilyak/awesome-ai-agents#845 ·
Les mainteneurs répondent en général sous 1 jour
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertedifficulty:2 enhancement good first issue
Difficulté 1/5 1-3 heures Accessibilité débutants 92/100
MakazhanAlpamys/Soup#2178 ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
scverse/rapids-singlecell#854 ·
Les mainteneurs répondent en général sous 1 jour
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPeut-être pris @ninglinLiu l’a pris il y a 1 jour. Ouvertearea:frontend backend:slang bug direction:input
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 1 jour
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalsePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 13 jours