Skip to content

feat(ui): add screenshot test banner to soccer-app homepage - #41

Open
ayushtr-aws wants to merge 2 commits into
mainfrom
bgagent/01M2KBFV6NVP9MP3SQ3XDXQNKA/tg-22-add-a-screenshot-test-banner-noformat-add-a-
Open

ayushtr-aws wants to merge 2 commits into
mainfrom
bgagent/01M2KBFV6NVP9MP3SQ3XDXQNKA/tg-22-add-a-screenshot-test-banner-noformat-add-a-

Conversation

@ayushtr-aws

Copy link
Copy Markdown
Owner

Summary

Adds a visible banner reading "Jira screenshot test 698" near the top of the soccer-app homepage.

  • soccer-app/src/App.tsx: renders a .screenshot-test-banner div as the first child of .app, directly above the existing <header className="app-header">, so it sits at the very top of the page. Uses role="status" so assistive tech announces it.
  • soccer-app/src/App.css: adds full-width, centered, bold styling for the banner using the existing --accent-bright CSS custom property, so it renders correctly in both light and dark themes (the repo drives theming via :root / :root.dark-mode variables in index.css).

No existing functionality was touched — the header, theme toggle, search, sorting, team list, and team detail view are all unchanged. The change is purely additive (15 lines added, 0 removed).

Issue: TG-22

Build and test results

soccer-app dependencies were not present in the container, so npm install was run first (the pre-agent build had failed for this reason, not because of any code problem).

Command Result
npm install (in soccer-app) pass
mise run build (tsc -b && vite build) pass — 20 modules transformed, built in 112ms
mise run lint (oxlint) pass — no warnings or errors

The repo has no test suite (no test runner or test files, and no test script in package.json), so there were no tests to run. Instead I verified the change against the production bundle:

  • grep -c "Jira screenshot test 698" dist/assets/*.js → 1 (banner text present in the built JS)
  • grep -c "screenshot-test-banner" dist/assets/*.css → 1 (banner styles present in the built CSS)

Decisions made

  • Placement: "near the top" was interpreted as above the app header rather than inside it, so the banner spans the full page width and is impossible to miss in a screenshot. Putting it inside the header would have competed with the existing flex layout (title on the left, team count + theme toggle on the right).
  • Styling: reused the existing --accent-bright variable rather than hardcoding a colour, so the banner stays theme-consistent. White text on that blue meets contrast expectations in both themes.
  • Text: used the exact string from the ticket, including the number 698, with no extra decoration or icons.

Agent notes

What went well

  • The change itself was small and well-scoped. The repo is a single Vite + React 19 + TypeScript app under soccer-app/, with a flat and readable component structure (App.tsx plus two components), so finding the right insertion point took only a couple of reads.
  • mise.toml exposes clean build, lint, and dev tasks that map onto npm scripts, which made verification straightforward.

What was difficult

  • The initial build failed with sh: 1: tsc: not found. The root cause was simply that soccer-app/node_modules was not installed in the container — mise install only provisions Node 24, it does not run npm install for the nested app. Running npm install inside soccer-app/ fixed it and both build and lint then passed. This matches a known pattern in this repo's history: dependency installation for the nested app is a separate step from mise install.
  • Build-regression and lint gating were reported as inert for this repo, so I verified the outcome manually by grepping the emitted dist/ bundle for the banner text and class name.

Repo conventions discovered

  • Commits follow conventional commit format with a module scope, e.g. feat(ui): ..., feat(players): ..., docs(test): .... ui is the established scope for presentational changes.
  • Theming is done with CSS custom properties declared in src/index.css under :root and :root.dark-mode; App.tsx toggles a dark-mode class on <html> via a useEffect. Dark mode is currently the default (useState(true)). New UI should consume variables like --accent-bright rather than literal colours so both themes keep working.
  • App.css is organised into /* ===== Section ===== */ comment blocks; I followed that pattern for the new banner rule.
  • Linting is via oxlint (not ESLint), and the build is tsc -b && vite build, so type errors fail the build.

Suggestions for future tasks

  • Consider wiring npm install (or npm ci) for soccer-app/ into the mise setup, or adding a postinstall/bootstrap task, so the first mise run build in a fresh container succeeds without manual intervention.
  • Setting pipeline.buildCommand to mise run build and pipeline.lintCommand to mise run lint in the repo blueprint would enable real build and lint gating, which is currently inert.
  • There is no test infrastructure at all. If assertions on UI content (like this banner) are expected to be enforced over time, adding Vitest plus React Testing Library would be a good foundational investment.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Adds a visible banner reading "Jira screenshot test 698" above the header
so screenshot-based verification has a stable, unmistakable marker.

Co-Authored-By: Claude <noreply@anthropic.com>

Task-Id: 01M2KBFV6NVP9MP3SQ3XDXQNKA
Prompt-Version: 1c9c10e027a2
@aws-amplify-us-east-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-41.d1prbufb0nhsx2.amplifyapp.com

@ayushtr-aws

Copy link
Copy Markdown
Owner Author

🖼️ Preview screenshot

preview

From preview link — captured automatically by ABCA after the deploy finished.

Improves banner legibility in screenshots per PR review feedback.

Co-Authored-By: Claude <noreply@anthropic.com>

Task-Id: 01M2NJ4PRN30F49A41H6QNNPNJ
Prompt-Version: 1c9c10e027a2
@ayushtr-aws

Copy link
Copy Markdown
Owner Author

Done in e29d64f — bumped the banner font size and changed the text to black.

What changed

soccer-app/src/App.css, .screenshot-test-banner only:

Property Before After
font-size 0.95rem 1.5rem
color #ffffff #000000

Nothing else was touched — background (var(--accent-bright)), padding, weight, letter-spacing, and App.tsx are unchanged.

Notes / decisions

  • 1.5rem (~24px) is a clear step up from the original ~15px and makes the banner unmistakable in a screenshot, while still fitting on one line at narrow widths. Happy to go bigger (e.g. 2rem) if you want it more dominant.
  • Black on --accent-bright (#3b82f6) is ~6.8:1 contrast, so it comfortably passes WCAG AA for normal text and AAA at this size. Since --accent-bright is the same value in both :root and :root.dark-mode, the banner reads identically in light and dark themes — no theme-specific override needed.

Comments addressed

  • "can you make the font bigger and change the text color to black?" — addressed in e29d64f.

Nothing needed clarification, and nothing was left unaddressed. There were no inline review threads on this PR, only the top-level request.

Build and test results

Command Result
npm install (in soccer-app) pass — required first, node_modules isn't provisioned by mise install
mise run build (tsc -b && vite build) pass — 20 modules transformed, built in 110ms
mise run lint (oxlint) pass — exit code 0, no warnings or errors

The repo still has no test suite, so as before I verified against the production bundle instead:

$ grep -o 'screenshot-test-banner{[^}]*}' dist/assets/*.css
screenshot-test-banner{background:var(--accent-bright);color:#000;text-align:center;letter-spacing:.5px;padding:10px 24px;font-size:1.5rem;font-weight:700}

Both color:#000 and font-size:1.5rem are present in the emitted CSS. The Amplify preview deploy should pick this up and refresh the screenshot automatically.

@ayushtr-aws

ayushtr-aws commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner Author

Background agent — COMPLETED

Field Value
Task 01M2NJ4PRN30F49A41H6QNNPNJ
Repo ayushtr-aws/abca-testing
Status COMPLETED
Last event task_completed @ 2026-09-16T16:54:11.318Z
Pull request link
Duration 69.3s
Cost $0.2066

@ayushtr-aws

Copy link
Copy Markdown
Owner Author

🖼️ Preview screenshot

preview

From preview link — captured automatically by ABCA after the deploy finished.

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