fix(render): offer the Aside remedy only on macOS (#3735); fix docs/skills.md vision-model line (#3375) (#4131)

* fix(render): offer the Aside remedy only on macOS (#3735)

NO_BROWSER_HELP told Linux and Windows hosts to open the Aside app, which
ships only for macOS. noBrowserHelp(platform) now adds the Aside remedy on
darwin only and keeps the ./setup and GSTACK_BROWSE_BIN remedies everywhere.
Also corrects docs/skills.md's /design-html refinement loop, which still said
"Uses GPT-4o vision", to match the design-html template (#3375).

Rewritten on main from outside PR #4122.

Co-authored-by: szsunyuan <3579304+szsunyuan@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore(changelog): name the #3735 fragment after the branch

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: szsunyuan <3579304+szsunyuan@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-11-07 16:53:52 +00:00
1 parent 31c3ef01f1
commit 9b491bb9be
6 files changed
+29 -6

No files matched your search

+18 -1
View File
@@ -14,7 +14,7 @@ import { spawnSync } from 'child_process';
import {
buildRenderScript, lengthToInches, paperInches, renderWithAside, RENDER_SENTINEL,
resolveBrowseBin, browsePdfPayload, browseScreenshotArgs, renderWithBrowse, NO_BROWSER,
serveDir, pickEngine, SAFE_TMP_DIR,
serveDir, pickEngine, SAFE_TMP_DIR, noBrowserHelp, NO_BROWSER_HELP,
type RenderSpec, type RenderResult, type AsideProbe, type EngineChoice,
} from '../lib/aside-render';
import { asideAvailable } from './helpers/aside-available';
@@ -950,6 +950,23 @@ describe.skipIf(!HERMETIC)('aside-render: renderWithBrowse — daemon CLI contra
}, 20_000);
});
describe('aside-render: missing-browser advice (#3735)', () => {
// Value: protects=Aside recovery advice only on macOS, bundled-browser advice everywhere; fails_when=Linux or Windows hosts are told to open the macOS-only Aside app, or a host loses the ./setup remedy; why_new=no test covered the advice per platform; seam=none
test.each(['linux', 'win32', 'darwin'] as const)('%s gets only the remedies it can use', (platform) => {
const help = noBrowserHelp(platform);
expect(help).toContain('./setup');
expect(help).toContain('GSTACK_BROWSE_BIN');
expect(help.includes('open the Aside app')).toBe(platform === 'darwin');
expect(help.includes('aside.com')).toBe(platform === 'darwin');
});
test('NO_BROWSER_HELP and the no-engine error use this host\'s advice', () => {
expect(NO_BROWSER_HELP).toBe(noBrowserHelp(process.platform));
const choice = pickEngine(true, { probe: () => ({ ok: false, reason: 'NEEDS_ASIDE', detail: 'stub' }), resolveBin: () => null });
expect(choice.engine === null && choice.error).toBe(`${NO_BROWSER}: ${NO_BROWSER_HELP} (NEEDS_ASIDE: stub)`);
});
});
describe('aside-render: pickEngine — cached engine choice through the probe/resolver seam', () => {
const notRunning: AsideProbe = { ok: false, reason: 'ASIDE_NOT_RUNNING', detail: 'the app is closed' };
const noBin = (): null => null;