Skip to content

Charts carry their source, small and muted in the bottom left corner - #60

Merged
robdevops merged 2 commits into
mainfrom
claude/envirobot-next
Nov 1, 2026
Merged

robdevops merged 2 commits into
mainfrom
claude/envirobot-next

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Every chart now shows a small, muted "Source: …" line in its bottom-left corner.

  • Every chart tool (weather_history, weather_days, weather_link, air_quality, air_days, plot_chart, air_link, air_scan) takes an optional source argument. One new prompt line asks the model to give the site, tool or URL the data came from, and not to repeat it in its reply.
  • If the model leaves it out, the tool's own device is used ("Ecowitt weather station", "AirGradient sensor"). Charts that combine both devices name the ones their readings come from.
  • The source is set for the length of one tool call, through a context variable, so two calls made at the same time don't mix up their sources. It is kept to one line and cut at 60 characters.
  • The panels give up 0.07 in at the foot, so the line stays clear of the time axis labels. Charts stay 1280×720, and charts without a source look exactly as before.
  • The temperature, air and wind sample charts now carry a source, so their reference images were redrawn in both light and dark themes. New tests are in tests/test_chart_source.py.

Known: test_year_long_questions_get_dated_monthly_figures_once_the_history_is_cached fails on the unchanged base too. It may depend on the date and is not related to this change.


Generated by Claude Code

Every chart tool (weather_history, weather_days, weather_link, air_quality, air_days, plot_chart, air_link, air_scan) is offered a
`source` argument, and the prompt asks the model to name the site, tool or URL the data came from. Without one, the tool's own
device is used ("Ecowitt weather station", "AirGradient sensor"; the composer names the devices its readings come from). The source
is set for the length of one tool call (a context variable, so calls made together don't mix) and taken by the charts built in it;
it is cut to one line of 60 characters. The panels give up 0.07 in at the foot for it, clear of the time axis's labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
Ending at 00:00 on the 1st of a month (yesterday being the 1st in the station's time zone) gave that month a row of its one
reading, whose low equals its high, so the test failed on those days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
@robdevops
robdevops merged commit cb52215 into main Nov 1, 2026
3 checks passed
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.

2 participants