Skip to content

character create: editor URL 404s on non-English locales (default --locale en-US is not a valid Flow URL segment) #153

Closed

Description

@ffroliva

Summary

gflow character create fails on non-English Flow accounts because the character-editor URL is built with the raw BCP-47 --locale value (default en-US), but Flow's URL locale path segment is a short code (/fx/pt/..., /fx/en/...). The tool must be language-agnostic.

Repro

gflow character create --project <pid> --name X --face-prompt "..." on a pt-locale account (default --locale en-US).

Observed

  • URL built: https://labs.google/fx/en-US/tools/flow/project/<pid>/character/<eid> (see routes.character_editor_url, api/routes.py).
  • en-US is not a valid Flow locale segment → 404 → redirect to the account-locale 404 (https://labs.google/fx/pt/404).
  • _enter_character_editor then fails: Character editor not ready: prompt textbox not visible within 20 s.

Confirmed cause

The recon spike scripts/dev/spike_char_editor_title.py defaults --locale pt and uses the same routes.character_editor_url() — it enters the editor fine. Production fails only because the default is the BCP-47 en-US.

Suggested fix (language-agnostic)

Normalize the locale to its primary subtag when building the editor URL, e.g. locale.split('-')[0].lower() → en-US→en, pt-BR→pt. Prefer deriving the segment from the account's actual Flow UI locale where available. Add a unit test pinning the URL form for en-US/pt-BR inputs.

Impact

Blocks character create on every non-en account using the default locale. Discovered while building the character promo (gflow-cli-remotion); worked around there by passing --locale pt, but the tool itself should not require it.

Activity

  1. added 2 commits that reference this issue on Jun 4, 2026
  2. added 3 commits that reference this issue on Jun 6, 2026
    ce4329f
    607f4a1
    a08d89b
  3. added 5 commits that reference this issue on Aug 24, 2026
    062f375
    d03eec5
    2669616
    bcf1252
    b39c07e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions