Skip to content

docs(FR-2650): add locale-capture spec + initial 22 page-overview captures (ko/ja/th)#6885

Closed
ironAiken2 wants to merge 1 commit into04-22-docs_fr-2645_replace_6_dark-mode_webui_screenshots_with_light-mode_captures_across_all_4_languagesfrom
04-22-docs_fr-2650_add_locale-capture_spec_initial_22_page-overview_captures_ko_ja_th_
Closed

docs(FR-2650): add locale-capture spec + initial 22 page-overview captures (ko/ja/th)#6885
ironAiken2 wants to merge 1 commit into04-22-docs_fr-2645_replace_6_dark-mode_webui_screenshots_with_light-mode_captures_across_all_4_languagesfrom
04-22-docs_fr-2650_add_locale-capture_spec_initial_22_page-overview_captures_ko_ja_th_

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented Apr 22, 2026

Stacked on top of #6868.

Resolves FR-2650 (initial wave). Parent: FR-2645.

Summary

Introduces a manifest-driven Playwright spec that captures docs screenshots in ko, ja, th UI locales using window.switchLanguage(lang) (PR #5796 / FR-2230) — no per-language navigation required.

This first wave covers 22 no-setup page-overview captures × 3 languages = 66 PNG files. Further entries (modals, forms, action sequences) can be appended to the MANIFEST array with per-image setup/cleanup functions.

Why a spec instead of manual capture

Per the FR-2650 audit there are ~272 unique WebUI images that need re-capture in 3 locales (~816 captures). Doing this manually is impractical and error-prone:

  • Reproducible: spec can be re-run when UI changes; same code captures in all 3 languages from one page setup.
  • Incremental: extend MANIFEST one entry at a time as time permits.
  • Auditable: each entry encodes its own setup contract (URL, modal opens, etc.) in code.

What's in this PR

e2e/screenshot-locale-capture.spec.ts

A Playwright spec that:

  1. Logs in as admin (via loginAsAdmin from existing test-util).
  2. Sets viewport to 1440×900 logical (1× non-retina per SCREENSHOT-GUIDELINES.md).
  3. For each manifest entry: navigates to URL, waits for page load + network idle, runs optional setup(), hides React Grab dev toolbar, then loops switchLanguage('ko'|'ja'|'th') → screenshot → save to packages/backend.ai-webui-docs/src/{lang}/images/<file>.png.
  4. Supports three capture modes: viewport (default), CSS-selector element, or clip rect.
  5. SCREENSHOT_FILTER env var filters entries by filename substring (e.g. SCREENSHOT_FILTER=dashboard ... only captures dashboard).

Initial manifest (22 entries)

Section Entries
Overview dashboard, summary, agent_summary, statistics, my_environment_page, start_page
Admin admin_dashboard, admin_user_page, admin_serving_page, agent_list, agent_settings, credentials, credential_list_tab
Storage / Compute image_list_page
Model model_store_page_overview, admin_model_card_list_v2
Chat chat_page
Fair Share fair_share_user_page, fair_share_project_page, fair_share_domain_page, fair_share_resource_group_page
Element-only header (via [data-testid="webui-header"])

Generated outputs

66 new/updated PNG files under:

  • packages/backend.ai-webui-docs/src/ko/images/ (22 files in Korean UI)
  • packages/backend.ai-webui-docs/src/ja/images/ (22 files in Japanese UI)
  • packages/backend.ai-webui-docs/src/th/images/ (22 files in Thai UI)

Run the spec

# All entries (4-6 minutes)
pnpm exec playwright test e2e/screenshot-locale-capture.spec.ts --project=chromium

# Subset by filename keyword
SCREENSHOT_FILTER=dashboard pnpm exec playwright test e2e/screenshot-locale-capture.spec.ts --project=chromium

Requires the dev WebUI server running at http://localhost:9081 (or E2E_WEBUI_ENDPOINT env var) and an admin user (credentials in e2e/envs/.env.playwright).

Follow-up work

The remaining ~250 unique images mostly require state setup (open modal, fill form, populate folder list, start session, etc.). Add them to MANIFEST incrementally with setup/cleanup functions. Pattern example is included as a comment in the spec.

🤖 Generated with Claude Code

…tures (ko/ja/th)

Introduces e2e/screenshot-locale-capture.spec.ts which iterates a manifest of
(filename, url, optional setup, optional capture target) and captures each in
ko/ja/th locales using window.switchLanguage (PR #5796 / FR-2230).

Initial manifest covers 22 no-setup page-overview captures across
dashboard, summary, agent_summary, statistics, my_environments, start,
image list, agent list, credential views, fair share pages, chat,
admin pages, and the header element. Total 66 PNG files (22 × 3 langs).

Further entries (modals, forms, action sequences) can be appended to the
MANIFEST array with per-image setup/cleanup functions.

Resolves FR-2650 (initial)
@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 22, 2026
Copy link
Copy Markdown
Contributor Author

ironAiken2 commented Apr 22, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ironAiken2
Copy link
Copy Markdown
Contributor Author

Closing — manifest-based bulk capture approach is unsuitable. Many captures were wrong: orphaned filenames (admin_dashboard, statistics, my_environment_page, model_store_page_overview), wrong tabs (credentials/credential_list_tab both default to Users tab on /credential), missing admin mode (admin_serving_page, image_list_page, agent_list captured user view), modal-vs-page mismatches (agent_settings is a modal not the page), and drill-down state not captured (fair_share_user/project/domain_page require Resource Group → Domain → Project click sequence). Switching to direct Playwright MCP captures with per-image context. Branch reset; new PR will follow.

@ironAiken2 ironAiken2 closed this Apr 22, 2026
graphite-app Bot pushed a commit that referenced this pull request Apr 27, 2026
…ext rendering (#6891)

Stacked on top of #6868. Resolves part of FR-2650.

## Summary

First incremental batch of locale screenshot recapture under FR-2650. **1 file** (`dashboard.png`) recaptured in 3 locales using `window.switchLanguage()` (PR #5796 / FR-2230).

## Approach

The earlier manifest-based bulk approach (PR #6885, closed) produced too many context-wrong captures (admin vs user view, wrong tabs, modal vs page, drill-down state, etc.). This PR series uses **direct Playwright MCP capture** with per-image context lookup.

Progress tracked at `packages/backend.ai-webui-docs/.agent-output/fr-2650-progress.md` (gitignored, 259 entries pending). Next sessions pick up from there incrementally.

## Capture process used

1. Navigate to `/dashboard` in dev WebUI
2. Hide React Grab dev toolbar
3. `window.switchLanguage('ko')` → screenshot → save to `src/ko/images/dashboard.png`
4. `window.switchLanguage('ja')` → screenshot → save to `src/ja/images/dashboard.png`
5. `window.switchLanguage('th')` → screenshot → save to `src/th/images/dashboard.png`

Viewport 1440×900 logical, light mode, admin user (`admin@lablup.com`).

## Note for reviewers

This PR will be amended/extended as more entries get captured incrementally. Current dashboard layout differs from the prior `en/images/dashboard.png` (different widget arrangement); framing matches the current dev environment which is what the docs render against.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant