[Bug]: bare /loopx renders the whole command-pack preview as a persistent widget — TUI truncates it and it covers the working indicator
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Widget được đặt trong inspectLoopx() tại loopx/pi_goal_mode/loopx-goal.ts, hàm này gọi ctx.ui.setWidget("loopx", ...) với packet.message thô đã cắt còn 24 dòng. Hãy đọc docs/tui.md về setWidget và vị trí hiển thị, sau đó thay văn bản thô bằng bản tóm tắt ba dòng được tạo từ goal_id, project_connection.connection_state và recommended_next_step.summary. Hoàn thành khi /loopx không kèm tham số hiển thị một widget belowEditor ngắn gọn, toàn bộ văn bản vẫn được gửi tới mục loopx-packet, và widget bị xóa khi session_shutdown.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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…"
- Ngôn ngữ chính
- Python
- Star
- 6.2k
- Fork
- 596
- Merge trung bình
- 7 giờ 35 phút
- Pull request đã merge (30 ngày)
- 928
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của loopx-project/loopx
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
loopx-project/loopx#6842 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
loopx-project/loopx#5688 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
loopx-project/loopx#5632 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
loopx-project/loopx#5443 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
loopx-project/loopx#5026 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của loopx-project/loopx
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
foxglove/mcap#1907 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
namespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#14623 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
developmentseed/titiler-cmr#261 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
andrewyng/openworker#774 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aggfuncĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
worldbank/blackmarblepy#160 ·