Skip to content

fix(hub): Grok TUI overlays, web folder browse, slash completeness - #3

Open
ngav1491 wants to merge 2 commits into
ishizakahiroshi:mainfrom
ngav1491:main
Open

fix(hub): Grok TUI overlays, web folder browse, slash completeness#3
ngav1491 wants to merge 2 commits into
ishizakahiroshi:mainfrom
ngav1491:main

Conversation

@ngav1491

Copy link
Copy Markdown
Contributor

Summary

Cross-fork PR from ngav1491/many-ai-cli (already merged as PR #1 on the fork).

  • Grok /resume / /history / /help blank pickers: passthrough the Hub xterm cursor-hide filter for provider === 'grok' so CUP-heavy alt-screen overlays are no longer discarded (same class as prior OpenCode picker bugs).
  • Spawn 📁 browse: when native folder pick fails (remote Linux without zenity/kdialog, or env_kind: remote), open an in-browser directory browser via /api/list-subdirs.
  • Grok slash table: expand resources/slash-commands/grok.md (includes /history, /context, /fork, …).
  • Grok chat history API: prefer session dirs with displayable user/assistant messages when matching cwd+time.
  • i18n: chat history / history-lite rebuild on i18n-ready; English fallbacks; web-dir browser strings (en/ja/vi).

Commits

  • a2e9b67 fix(hub): Grok TUI overlays, web folder browse, slash completeness
  • (merge commit on fork) 54de2e6

Test plan

  • Operator: Hub Grok session — /resume lists prior sessions for same cwd
  • Operator: /history shows prompt history after session has prompts
  • go test ./internal/hub/ -run 'Grok|FindGrok|ChatHistory'
  • Hard-refresh Hub after deploy; spawn Grok; re-check /resume and /history
  • Remote: New session → 📁 → web modal lists subdirs and selects cwd
  • grok sessions list still lists disk sessions (control)

Notes

ngav1491 and others added 2 commits July 20, 2026 20:15
Passthrough the cursor-hide filter for Grok so alt-screen pickers
(/resume, /history, /help) render in the Hub xterm instead of blanking.
Add a web directory browser when native pick-directory is unavailable
(remote Linux / no zenity). Expand Grok slash-command docs, prefer
non-empty chat_history matches for /api/grok-history, and improve
chat/history-lite i18n fallbacks.

Operator-verified: /resume lists prior sessions; /history shows prompts.
…-browse

fix(hub): Grok TUI overlays, web folder browse, slash completeness
@ishizakahiroshi

Copy link
Copy Markdown
Owner

Hi @ngav1491, thank you very much for this contribution! 🙏 The fixes look really valuable — Grok picker passthrough, remote spawn folder browser, and the expanded slash table all address real pain points, and the fact that you already validated them on your fork is much appreciated.

Release plan

We are currently in the release-freeze window for v0.5.1 (tag going out shortly), so I would like to review and merge this PR for v0.5.2 rather than rushing it into v0.5.1. This lets me give the ~+900 line diff (especially spawn-panel.ts and the new /api/list-subdirs path) the security review it deserves without holding up the current release.

Timeline target: v0.5.2 review starts within ~1 week after v0.5.1 ships.

One request — could you rebase onto develop?

This repo uses a developmain flow: all feature work lands on develop first, and main only moves forward at release tag time. The current PR targets main directly, which will conflict with our release process. If you can:

  1. Rebase your branch onto origin/develop
  2. Change the PR base branch to develop (GitHub UI: "Edit" next to the PR title → change base)

…that would make the review and merge straightforward. If rebasing is inconvenient, no problem — I can also cherry-pick the commits manually, just let me know.

Thanks again for the careful write-up and the tested checklist — it makes review much easier. Looking forward to landing this in v0.5.2!


@ngav1491 さん、素晴らしい貢献をありがとうございます!🙏 Grok picker の passthrough、リモート spawn のフォルダブラウザ、slash table 拡充、いずれも実際に困っていた箇所で、fork 側で既に検証まで済ませていただいている点も本当に助かります。

リリース計画について

現在ちょうど v0.5.1 のリリースフリーズ期間に入っており(近日中にタグ push 予定)、この PR は v0.5.1 に押し込むのではなく v0.5.2 でのレビュー・マージとさせてください。約 900 行の差分(特に spawn-panel.ts と新規 /api/list-subdirs 経路)は、v0.5.1 を止めずに落ち着いてセキュリティレビューしたいと考えています。

目安: v0.5.1 リリース後、約 1 週間以内に v0.5.2 のレビュー開始予定です。

1 点お願い — base を develop に変更していただけますか

本リポジトリは developmain の運用で、feature ブランチはまず develop に merge、main はリリースタグ時のみ進みます。この PR は main を base にしているため、リリースフローと衝突してしまいます。可能でしたら:

  1. ブランチを origin/develop に rebase
  2. PR の base branch を develop に変更(GitHub UI: PR タイトル横の "Edit" → base を変更)

をお願いできると助かります。rebase が難しい場合はこちらで手動 cherry-pick しますので、その旨コメントください。

丁寧な PR 説明とテストチェックリスト、大変助かります。v0.5.2 でお目にかかるのを楽しみにしています!

@ishizakahiroshi

Copy link
Copy Markdown
Owner

Quick follow-up: v0.5.1 just shipped 🎉 — and it includes your Vietnamese localization from PR #2 as an officially released feature!

Users installing v0.5.1 via npm i -g many-ai-cli / winget / Homebrew will get your vi.json and the docs/*.vi.md set out of the box. Cảm ơn bạn rất nhiều! 🙏

This PR (#3) is still on track for v0.5.2 review as I mentioned earlier — no change to that plan. Whenever you get a chance to rebase onto develop (or ping me if you'd like me to cherry-pick manually), we can move it forward.


補足です: v0.5.1 をリリースしました 🎉 — PR #2 のベトナム語ローカライズが正式機能として同梱されています!

  • リリース: https://github.com/ishizakahiroshi/many-ai-cli/releases/tag/v0.5.1
  • 主な変更: vi ロケール(あなたの貢献!)、バグ報告フロー、VT scrollback 拡張、wrapper 非同期化、セキュリティ修正 8 件(F1/F3/F9/F10/F14/F15/F18/F35)、Codex 同期描画復元、session dismiss / 並び順の bugfix

npm i -g many-ai-cli / winget / Homebrew から v0.5.1 を入れた全ユーザーに、あなたの vi.jsondocs/*.vi.md が最初から届くようになります。本当にありがとうございます!🙏

この PR #3 は先ほどお伝えしたとおり v0.5.2 でのレビュー予定に変更ありません。develop への rebase いただけるタイミング、もしくは手動 cherry-pick 希望の旨をコメントいただければ進めます。

@ishizakahiroshi

Copy link
Copy Markdown
Owner

Thank you for PR #3. I reviewed it carefully and decided to adopt the useful parts selectively rather than merge the PR as a whole.

I will adopt:

  • the Grok fullscreen TUI display fix for /resume, /history, and /help
  • the browser-based folder picker for remote/headless Hub environments
  • the expanded Grok slash-command documentation

I will not adopt the change in internal/hub/grok_history_handler.go that chooses a non-empty Grok history by comparing message counts.

The reason is that many-ai-cli currently does not have an exact Grok-internal session ID to correlate with a Hub session. The matching is inferred from the working directory and timestamps. If the nearest candidate is an empty stub, choosing a farther candidate with more messages may display a different conversation. That would turn “no history” into “possibly the wrong history,” which is a correctness risk.

This is also not a failure of Grok itself. It only affects the optional many-ai-cli Chat-tab history viewer; Grok's native /resume and /history operation are separate. Since Chat-tab history is not required for Grok to work, I prefer to keep the existing behavior until exact session correlation is possible. We can revisit that part in a separate change when the mapping is reliable.

The PR is not being rejected as a whole—thank you for the fixes. The clearly scoped Grok TUI, remote folder browsing, and slash-command improvements are the parts I intend to carry forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants