Skip to content

fix(nano_banana_dashboard): inject current date into prompt and cache key#116

Closed
natesilva wants to merge 1 commit into
usetrmnl:masterfrom
natesilva:fix-111-nano-banana-current-date
Closed

fix(nano_banana_dashboard): inject current date into prompt and cache key#116
natesilva wants to merge 1 commit into
usetrmnl:masterfrom
natesilva:fix-111-nano-banana-current-date

Conversation

@natesilva

Copy link
Copy Markdown

When the plugin refreshes after midnight, source plugin data (e.g. calendar’s today_in_tz) may still contain yesterday's date. The Gemini prompt had no independent date reference, causing the LLM to render calendars and date-dependent visuals for the wrong day.

  • Add current_date method returning user’s timezone-aware date
  • Inject today’s date into prompt before source data, with override instruction to prefer it over stale dates in source data
  • Prepend current_date to cache key so the image regenerates on date change

Fixes #111

… key

When the plugin refreshes after midnight, source plugin data (e.g.
calendar’s today_in_tz) may still contain yesterday's date. The Gemini
prompt had no independent date reference, causing the LLM to render
calendars and date-dependent visuals for the wrong day.

- Add current_date method returning user’s timezone-aware date
- Inject today’s date into prompt before source data, with override
  instruction to prefer it over stale dates in source data
- Prepend current_date to cache key so the image regenerates on date
  change

Fixes usetrmnl#111
@ryanckulp

Copy link
Copy Markdown
Contributor

apologies for missing this @natesilva , tagging @ikraamg to review.

@ryanckulp
ryanckulp requested a review from ikraamg July 15, 2026 19:45
@ikraamg

ikraamg commented Jul 16, 2026

Copy link
Copy Markdown

Hi @natesilva 👋

Apologies once again for missing this. I have made two changes, one a couple weeks back, and one yesterday that might resolve this bug. Please let me know if this is still a relevant issue for you and I will double down on an improved fix.

@natesilva

Copy link
Copy Markdown
Author

Hi @ikraamg.

We can close this, and it’s because of TRMNL’s new plugin refresh strategy. In the past, the calendar’s today_in_tz field might have contained yesterday’s date, if the calendar hadn’t been refreshed recently. With the new plugin refresh strategy it is refreshed just before retrieval and contains today’s date.

I still think it would be good for these prompts to have the current date injected. The new refresh logic does solve the problem, but it’s an incidental fix rather than an explicit direct fix.

Closing this.

@natesilva natesilva closed this Jul 23, 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.

Include today's date in user's timezone in the image generation prompt

3 participants