You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "hqhq1025 (via GitHub)" <gi...@apache.org> on 2026/09/09 04:33:32 UTC
Re: [PR] fix(cli): discover resumable sessions from /resume [maka]
hqhq1025 commented on code in PR #3582:
URL: https://github.com/apache/maka/pull/3582#discussion_r3964675494
##########
packages/cli/src/pi-tui-runner.ts:
##########
@@ -2809,18 +2846,33 @@ export async function runMakaPiTui(input: MakaPiTuiInput): Promise<void> {
const [availabilityEntries, foreignScan] = await Promise.all([
Promise.all(
Review Comment:
[P2] Filter the default Current scope before awaiting candidate checks. `visibleSessions` excludes other working directories only at lines 2911-2914, after this `Promise.all` has started and awaited `turn.resume.query` for every row returned by the fully paged catalog. On this exact head, a compiled TUI probe with one `/repo` Session and sixteen `/other` Sessions whose candidate checks were held had not rendered the Current picker after 100 ms; nine checks had already started, including eight rows that could not be displayed, and the picker appeared only after those checks were released. The concurrency limit caps Host pressure, but open latency still scales with the entire catalog. Please query the current-cwd set first and defer the all-scope checks until the user selects All, or apply the filter/limit at the Host boundary.
##########
packages/cli/src/pi-tui-runner.ts:
##########
@@ -2944,6 +3010,31 @@ export async function runMakaPiTui(input: MakaPiTuiInput): Promise<void> {
renderScope();
};
+ const announceResumeAvailability = async (): Promise<void> => {
+ const sessionId = input.driver.getSessionId();
+ try {
+ if (!input.driver.getSessionResumeCandidateAvailability) return;
+ const sessions = await listSessions();
+ const session =
+ sessions.find((candidate) => candidate.id === sessionId) ??
+ sessions.find((candidate) => candidate.cwd === cwd);
+ if (!session) return;
+ const availability = await runResumeAvailabilityCheck(() =>
+ input.driver.getSessionResumeCandidateAvailability!(session),
+ );
+ if (availability.available) {
+ state.entries.push({
+ kind: 'notice',
+ level: 'info',
+ text: 'This session has an interrupted run — /resume to continue from the safe boundary.',
Review Comment:
[P2] Move this new user-visible hint into the localized TUI copy catalog. The TUI supports `en`, `zh-CN`, and `zh-TW`, but this path always emits English. More immediately, `npm run check:tui-copy` fails on this exact line, which is also the sole failure in the hosted `test` job, so the required gate cannot pass. Add the message to the appropriate catalog domain with aligned translations and resolve it through `locale`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org