Skip to content

Display package version label in all widgets (#236) - #237

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

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

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #236.

Adds a muted, right-aligned WidgetVersion row using each widget package’s named version import from its own package.json. The row renders below content in normal flow and adds height. Future-widget instructions document the requirement.

Focused follow-up (51d0273)

  • Remove the GovernanceOnboardingWidget label while retaining GovernanceWidget’s package version.
  • Preserve CitizenClaim and Superfluid Campaign labels and explain intentional embedded labels in the review thread.
  • Correct the normal-flow layout wording to state that the row adds height.
  • Run existing checks and desktop/mobile, light/dark QA; commit updated screenshot evidence and summarize results.

Only two source files and QA images changed in this follow-up. No automated tests, stories, or testing infrastructure were added or changed.

QA evidence

Chromium; desktop 1280×900, mobile 430×932. All displayed labels matched the package versions below. Measured rows remained below their preceding content, with label bounds inside each row and viewport; no version-row clipping or overlap observed. Governance onboarding has one label. Embedded claim deliberately shows both packages’ labels.

36 screenshots, tracked in the existing per-widget test-results flow. The links below open each package’s evidence folder; latest captures are named version-<state>-<desktop|mobile>-<light|dark>.png.

Package Displayed version Captured states/themes (both widths) Screenshots
AI Credits v0.1.8 Disconnected, dark Evidence
CitizenClaim v0.2.1 Custodial, dark; embedded light/dark below Evidence
Claim theme demo v0.1.0 Showcase, light/dark Evidence
GoodData v0.1.0 Existing analytics app dashboard, dark Evidence
GoodReserve v0.1.7 Quote ready, light/dark Evidence
Governance v0.1.0 Onboarding light; dashboard light/dark Evidence
Staking migration v0.1.0 Ready, light/dark Evidence
Streaming v0.1.0-beta Populated, light/dark Evidence
Superfluid Campaign v0.1.6 (plus CitizenClaim v0.2.1 when embedded) Content and embedded claim, light/dark Evidence

AI Credits’ existing disconnected fixture and GoodData’s app host hard-code dark presentation; no light-mode coverage is claimed for those demos. CitizenClaim light presentation was checked within the existing Campaign showcase. No demos were modified to expand coverage.

Mobile onboarding: one governance label

Governance onboarding

Mobile embedded claim: intentional independent versions

Embedded claim dark
Embedded claim light

Validation

  • Seven existing package-version Playwright tests passed.
  • Existing Campaign embedded-claim open/close test passed.
  • Governance package build passed; ESLint on both edited files passed; git diff --check passed.
  • Full governance lint remains blocked by existing unrelated unused variables (widgetBounds in GovernanceWidget and ProfileTextAreaField in ProfileStepContent); left untouched.
  • Secret scan passed. Read-only review found no significant issues. Parallel validation’s automated review executable was unavailable; CodeQL skipped the trivial presentational changes.

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>

@sirpy sirpy 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.

  1. import only {version} from package.json instead of the whole file
  2. add tests to verify version text exists in the ui

@sirpy

sirpy commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
  1. import only {version} from package.json instead of the whole file
  2. add tests to verify version text exists in the ui

@copilot

@sirpy
sirpy requested review from L03TJ3 and a balanced review from Copilot October 7, 2026 13:07

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.

defaultTheme={defaultTheme}
>
<ClaimInner />
<WidgetVersion version={version} />
<Route path="*" element={<UnknownDashboardPage />} />
</Routes>
</BrowserRouter>
<WidgetVersion version={version} />
) : (
<DefaultGovernanceWidgetContent adapterInput={adapterInput} testId={testId} />
)}
<WidgetVersion version={version} />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the label and unused imports from GovernanceOnboardingWidget in 51d0273. GovernanceWidget retains its package-version label; existing onboarding QA now displays exactly one v0.1.0 row.

/>
</Card>
<ToastContainer />
<WidgetVersion version={version} />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both labels are intentional per the focused follow-up: each widget package displays its own version even when embedded. CitizenClaim retains v0.2.1 and Superfluid Campaign retains v0.1.6. Desktop/mobile light/dark embedded-claim screenshots in 51d0273 confirm both rows sit below their respective content without overlapping.

* It sits in normal flow below the widget content (right-aligned) so it never
* overlaps or shifts the widget layout.
*/
export function WidgetVersion({ version, testId = 'widget-version' }: WidgetVersionProps) {

test('GoodReserveWidget displays its package version', async ({ page }) => {
await page.goto('/iframe.html?id=widgets-goodreservewidget--interactive&viewMode=story')
await expect(page.getByTestId('widget-version')).toHaveText(`v${version}`, { timeout: 20_000 })
await page.goto(
'/iframe.html?id=qa-governancewidget-runtime-fixtures--disconnected-dashboard&viewMode=story',
)
await expect(page.getByTestId('widget-version')).toHaveText(`v${version}`, { timeout: 20_000 })
await page.goto(
'/iframe.html?id=qa-stakingmigrationwidget-runtime-fixtures--ready&viewMode=story',
)
await expect(page.getByTestId('widget-version')).toHaveText(`v${version}`, { timeout: 20_000 })
await page.goto(
'/iframe.html?id=qa-streamingwidget-runtime-fixtures--populated-state&viewMode=story',
)
await expect(page.getByTestId('widget-version')).toHaveText(`v${version}`, { timeout: 20_000 })
await page.goto(
'/iframe.html?id=qa-superfluidcampaignwidget-runtime-fixtures--no-wallet-content&viewMode=story',
)
await expect(page.getByTestId('widget-version')).toHaveText(`v${version}`, { timeout: 20_000 })
@sirpy
sirpy self-requested a review October 12, 2026 08:35
@L03TJ3

L03TJ3 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Focused follow-up for #237

  1. Remove the duplicate version label from GovernanceOnboardingWidget. Keep the package version displayed by GovernanceWidget.
    Display package version label in all widgets (#236) #237 (comment)

  2. Keep each widget package’s own version label, including when embedded in another widget. CitizenClaim and Superfluid Campaign should both retain theirs. Reply to the related review comment explaining that this is intentional.
    Display package version label in all widgets (#236) #237 (comment)

  3. Using the existing demos and QA setup, sanity-check the displayed versions against their package versions. Check desktop/mobile and light/dark presentation, and produce updated screenshots as part of the test-results flow.
    Confirm the added row does not clip or overlap content.

  4. Correct the comment claiming the label “never shifts layout”: it renders below the content and adds height.
    Display package version label in all widgets (#236) #237 (comment)

No new automated test coverage, stories or testing infrastructure is required for this patch.
Keep changes limited to the duplicate label, wording and QA evidence.
@copilot

…idence (#236)

Co-authored-by: L03TJ3 <6606028+L03TJ3@users.noreply.github.com>

Copilot AI commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Focused follow-up for #237

  1. Remove the duplicate version label from GovernanceOnboardingWidget. Keep the package version displayed by GovernanceWidget.
    ...

Addressed in 51d0273: removed the onboarding duplicate, corrected layout wording, and preserved both intentional embedded package labels. Added 36 QA screenshots across all nine packages at 1280×900 and 430×932, including light/dark pairs where existing demos expose them. Versions match package.json; checked rows remain below content without clipping/overlap. AI Credits’ fixture and GoodData’s host are dark-only. Seven existing version tests plus the embedded-claim open/close test, governance build, and edited-file ESLint passed. Full governance lint still reports unrelated existing unused-variable errors. No tests, stories, or infrastructure added.

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.

This branch was successfully deployed

5 active deployments
preview-ai-credits — 51d02737 Deployed Oct 13, 2026 by L03TJ3 via preview #367
preview-storybook — 51d02737 Deployed Oct 13, 2026 by L03TJ3 via preview #418
preview-superfluid-campaign — 51d02737 Deployed Oct 13, 2026 by L03TJ3 via preview #196
preview-gooddata — 51d02737 Deployed Oct 13, 2026 by L03TJ3 via gooddata-web-preview #91
internal — 51d02737 Deployed Oct 13, 2026 by L03TJ3 via authorize-preview #367
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

4 participants