Summary
The Title column doubles as the future filename of a published Commons file (sans extension). It needs to follow Commons' filename rules — uniqueness, length, character restrictions, readability — but today there's no validation. Implement client-side validation backed by Commons' API where needed, surface clear errors, and improve the default value so the title is something readable rather than a camera-generated string.
Research first
Survey how the Commons Upload Wizard validates filenames (it's the closest reference; we don't need to copy it exactly, but it's a good baseline). Document in the task the specific rules to enforce:
- Length limit (Commons / MediaWiki filename max length).
- Character restrictions (which characters are forbidden, e.g. /, :, leading/trailing whitespace, etc.).
- Readability heuristics (rule of thumb: plain readable text, not "IMG_2351"; not enforced strictly but called out).
- Uniqueness — a real-time check against Commons via API (likely action=query&prop=info&titles=File:<NAME>.<ext> to detect a clash). Cache the lookup with a small TTL.
Implementation
- Default value of the Title column: the original filename (sans extension) of the user's upload, instead of being blank. Today's "Original filename" column, which surfaces the same thing in a separate column, becomes:
- Optional — not visible by default.
- Available — the user can add it via the columns modal if they specifically want both side-by-side.
- Validation runs as the user edits a Title cell:
- Length, character restrictions: client-side, instant.
- Uniqueness: debounced API call to Commons; show a "checking…" indicator, then a tick or an error.
- Error display: inline, below the cell, with actionable wording — e.g. "Already exists on Commons — pick a different title" or "Forbidden character: ':'".
- Info link / icon: next to the column header or in its settings dropdown, link to Commons' filename guidance page.
Out of scope
- Suggesting alternative filenames automatically.
- Renaming the file extension from the column (the extension stays bound to the source file).
Acceptance
- New uploads land with the original filename pre-filled in the Title column (sans extension).
- "Original filename" column is present but hidden by default in the columns modal.
- Editing a title shows live validation errors for length, characters, and Commons-clash.
- Publishing is blocked while a Title cell has a validation error.
- The validator's behaviour matches the documented Commons / Upload Wizard rules.
Source
User feedback session, 2026-05-10.