Skip to content

Token Weather: read hasSurvey and bodyColumns from e.props - #17

Open
aquarius-wing wants to merge 1 commit into
anthropics:mainfrom
aquarius-wing:token-weather-read-props
Open

aquarius-wing wants to merge 1 commit into
anthropics:mainfrom
aquarius-wing:token-weather-read-props

Conversation

@aquarius-wing

Copy link
Copy Markdown

Summary

Token Weather's ui.render hook for AbovePrompt reads e.hasSurvey and e.bodyColumns. ui.render carries a site's data in e.props (the render sites table in the mods reference lists hasSurvey and bodyColumns as props of AbovePrompt), so both reads are always undefined:

  • hasSurvey: the band never yields while a survey holds it, so the forecast is drawn in the survey's place.
  • bodyColumns: the width check always falls back to 80, so the chart and the trend are drawn even on a band narrower than 60 columns, where band() means to leave them out.

This change reads both from e.props. Nothing else changes.

Checked with claude plugin validate and a throwaway claude plugin test file (not included, since #4 adds a test file of the same name) on Claude Code 2.1.295. After one turn.complete with a reading, the band is mounted on the terminal surface:

Case Before After
hasSurvey: true forecast drawn yields to the chain beneath
bodyColumns: 40 chart drawn chart left out
bodyColumns: 120 (control) chart drawn chart drawn

Related: #7 makes the band compose with the mods beneath it and touches the same return band(...) line, so whichever lands second needs a one-line merge. #12 also made this fix as part of a larger change and was closed.

I've read CONTRIBUTING.md and understand outside pull requests may be closed without review. Feel free to take the fix in whatever form suits the private source repository.

Directory

claude-code/mods/token-weather/

Pre-flight

Full checklist: _template/PREFLIGHT.md

  • Public models only; nothing unreleased is used or mentioned
  • No internal codenames, go-links, internal URLs, Slack links or employee-only docs
  • No secrets, internal email addresses, customer data or internal metrics
  • No trademarks in the entry name; Dependencies table filled in and every license permissive or flagged; third-party names and assets cleared and listed under Third-party notices (unchanged: no dependencies added)
  • Every code file carries the copyright and SPDX header; the entry runs from a clean checkout with placeholder config only
  • Entry README follows _template/README.md and the pre-flight scan passes (README unchanged; the scan is in the private repository, not run)
  • No automation added that pushes to, or opens PRs against, the public repo

🤖 Generated with Claude Code

The AbovePrompt hook read e.hasSurvey and e.bodyColumns, but ui.render
carries the site's data in e.props. Both reads were always undefined, so
the band never yielded to a survey and always laid itself out for 80
columns.
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@aquarius-wing

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Oct 14, 2026
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