fix(footer): read the thinking level from pi's ExtensionAPI #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-effort-source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocks the 2.5.1 publish — found by the mandated live smoke, exactly the class of bug the smoke exists for.
The bug
The effort suffix read
ctx.getThinkingLevel(). That method is on pi'sExtensionAPI, not the per-eventExtensionContextthe footer's other sources read (ctx.model,ctx.getContextUsage,ctx.modelRegistry,ctx.sessionManager). In a real session it returnedundefined, so the suffix silently never rendered — the footer readGPT-5.6 Solwith no level.The unit test faked
getThinkingLevelon the context object, so it agreed with the implementation and proved nothing.The fix
installClaudeFooter(ctx, pi)now takes the extension API as a second argument (both call sites inindex.tsalready havepiin scope) and reads the level from it. Omitting the argument simply drops the suffix.The test's fake context now carries a decoy
getThinkingLevel: () => "decoy"while the fake API returns the real level, so reading the wrong object fails the assertion instead of passing.Validation
Re-smoked in a live pi 0.80.10 session, claudify loaded from this checkout, running in a git worktree named
smoke-2-5-1:claudify, not the branch-named folder — the duplicate segment is gone.· xhigh)./claudify→ Footer → Effort → false drops the suffix from the running footer immediately, back to true restores it, andfooterEffortpersists to~/.pi/settings.json.bun run test15/15 green,tsc --strictclean. Version stays 2.5.1 — nothing has been published yet.