Skip to content

fix(pi-extension): guard status bar render when ui lacks a theme - #279

Merged
DietrichGebert merged 1 commit into
mainfrom
fix-84-theme-guard
Jun 23, 2026
Merged

DietrichGebert merged 1 commit into
mainfrom
fix-84-theme-guard

Conversation

@DietrichGebert

Copy link
Copy Markdown
Owner

Follow-up to #275 (the status bar from #84).

syncStatus guarded setStatus but used theme.fg unguarded, so a Pi host that exposes setStatus without a theme throws TypeError: Cannot read properties of undefined (reading 'fg') on session_start (and agent_start/agent_end/setMode). Real Pi provides both, so it never fired there. This closes the gap the existing setStatus guard already intended: the feature needs both, so lacking either it bails.

  • index.js: require setStatus and theme.fg before rendering.
  • tests: cover the render path (previously untested) and the theme-absent degradation (that test throws against the unfixed code).

npm test green.

syncStatus guarded setStatus but used theme.fg unguarded, so a Pi host
exposing setStatus without a theme threw TypeError on session_start (and
agent_start/agent_end/setMode). Require both before rendering.

Add tests for the render path (previously untested) and the theme-absent
degradation. Follow-up to #275 / #84.
@DietrichGebert
DietrichGebert merged commit c8b12b6 into main Jun 23, 2026
1 check passed
@DietrichGebert
DietrichGebert deleted the fix-84-theme-guard branch June 23, 2026 23:10
Afristrat pushed a commit to Afristrat/ponytail that referenced this pull request Sep 29, 2026
…richGebert#279)

syncStatus guarded setStatus but used theme.fg unguarded, so a Pi host
exposing setStatus without a theme threw TypeError on session_start (and
agent_start/agent_end/setMode). Require both before rendering.

Add tests for the render path (previously untested) and the theme-absent
degradation. Follow-up to DietrichGebert#275 / DietrichGebert#84.
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.

1 participant