Skip to content

Display package version label in all widgets - #237

Draft
sirpy with Copilot wants to merge 3 commits into
mainfrom
copilot/add-version-text-to-widgets
Draft

sirpy with Copilot wants to merge 3 commits into
mainfrom
copilot/add-version-text-to-widgets

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Widgets had no visible version. This adds a small version label, taken from each widget's package.json, to every widget. It also adds the requirement to the agent instructions so future widgets include it.

  • WidgetVersion primitive (@goodwidget/ui)

    • Renders a muted v<version> caption, right-aligned, on its own row.
    • It sits in normal flow as the last child of the widget root, so it can't overlap content.
    • Default data-testid="widget-version".
  • Widget wiring

    • Rendered inside GoodWidgetProvider in AI credits, citizen claim, claim theme demo, GoodData, GoodReserve, governance (GovernanceWidget and GovernanceOnboardingWidget), staking migration, streaming (StreamingWidget and StreamingWidgetPreview) and Superfluid campaign.
    • The version comes from a direct import of the package's own package.json:
      import packageJson from '../package.json'
      <WidgetVersion version={packageJson.version} />
    • GovernanceOnboardingWidget has no GoodWidgetProvider. The label renders inside PageWizardProvider and relies on the host's Tamagui theme.
  • tsconfig

    • tsconfig.json and tsconfig.build.json in every widget package now use "rootDir": "." and include package.json. The old rootDir: "src" rejected the import. tsup bundles the version at build time.
  • Docs and agent instructions

    • Added a "Widget Version Label" section and a review-checklist item to docs/widget-author-instructions.md.
    • Added a rule to the "Always" list in AGENTS.md.

No Storybook stories or Playwright smoke tests were added, so there are no screenshots with this PR.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Copilot AI linked an issue Oct 6, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits October 6, 2026 11:25
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>
Co-authored-by: sirpy <671095+sirpy@users.noreply.github.com>

This branch was successfully deployed

5 active deployments
preview-storybook — 85089b2e Deployed Oct 6, 2026 by Copilot via preview #390
internal — 85089b2e Deployed Oct 6, 2026 by Copilot via authorize-preview #390
preview-ai-credits — 85089b2e Deployed Oct 6, 2026 by Copilot via preview #348
preview-superfluid-campaign — 85089b2e Deployed Oct 6, 2026 by Copilot via preview #181
preview-gooddata — 85089b2e Deployed Oct 6, 2026 by Copilot via gooddata-web-preview #80
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.

Display widget version in it's UI

3 participants