mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 16:09:43 +02:00
fix(statusline): print nothing instead of the bare word codeman
Ported from #416 (discussion #405): a statusline reading just `codeman` is what a hand-run claude in a managed repo showed, and it reads as a broken config rather than a footer. Three paths produced it and all three now yield an empty footer: the exporter's `|| echo codeman` fallback (now `curl -sfk ... || true`, with -f keeping an HTTP error body off stdout), the unknown-session answer of POST /api/status-telemetry, and formatSessionStatusText() with nothing to show. The exporter script marker moves to V4 so live installs pick the new content up on the next spawn. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1516,10 +1516,17 @@ describe('statusline exporter script (real shell execution)', () => {
|
||||
expect(result.stdout.trim()).toBe('model: opus | 42% used');
|
||||
});
|
||||
|
||||
it('no-user-statusline branch: falls back to the plain "codeman" marker when curl fails', async () => {
|
||||
it('no-user-statusline branch: prints NOTHING when curl fails (never a bare brand word)', async () => {
|
||||
writeFakeCurl(`exit 1`);
|
||||
const result = await runExporter(baseEnv);
|
||||
expect(result.stdout.trim()).toBe('codeman');
|
||||
expect(result.stdout).toBe('');
|
||||
expect(result.code).toBe(0);
|
||||
});
|
||||
|
||||
it('asks curl to fail on HTTP errors (-f) so an error body never becomes the footer', async () => {
|
||||
const scriptPath = await resolveStatusLineCliCommand(testDir, true);
|
||||
expect(readFileSync(scriptPath!, 'utf-8')).toContain('curl -sfk');
|
||||
expect(readFileSync(scriptPath!, 'utf-8')).not.toContain('echo codeman');
|
||||
});
|
||||
|
||||
it('wrap branch: never blocks a reader-to-EOF on a slow/hung curl (background subshell closes stdin too)', async () => {
|
||||
|
||||
Reference in New Issue
Block a user