feat: Title column validation + sensible default

Summary

  • Title column now defaults to the original filename (sans extension) instead of being blank.
  • "Original filename" column (renamed from "Filename") is hidden by default; available via the columns modal.
  • Live local validation in the Title cell editor: forbidden characters, length (240-byte UTF-8 cap), structural rules, plus soft warnings for camera-default names (DSC, IMG, PXL, Screenshot, WhatsApp Image…).
  • Debounced (~400 ms) Commons uniqueness check via action=query&prop=info&titles=File:<title>.<ext>, cached through the shared apiCache (5-min TTL).
  • New blocking issue codes (invalid-title, title-taken) flow through BLOCKING_ISSUE_CODES so single + bulk publish are blocked while a Title cell carries a validation error.
  • Help-icon link in the Title column header opens Commons:File naming in a new tab.

Validation rules sourced from Commons:File naming, MediaWiki page title manual, and Commons:MediaWiki:Titleblacklist (soft warnings for camera-style auto-names that the server-side blacklist would reject anyway). Full ruleset is documented in the Phab task comment.

Phabricator

Test plan

  • New uploads land with original filename (sans extension) pre-filled in Title.
  • Existing stash items have the same default after a fresh load.
  • "Original filename" column hidden by default; toggle visible via columns modal works.
  • Click into a Title cell and type forbidden characters (/, :, [) — inline error appears, cell goes red.
  • Type a title >240 UTF-8 bytes — "Too long" error appears.
  • Type leading/trailing spaces or doubled spaces — error appears.
  • Type "DSC0001" — soft warning shows but doesn't block publish.
  • Type a known existing Commons title (e.g. "Tour Eiffel Wikimedia Commons") — after debounce, "Already exists" error appears.
  • Try to publish a row with an invalid title — Publish modal lists "Title — invalid (Commons filename rules)" or "Title — already exists on Commons" in blocking issues; Publish button stays disabled.
  • Header help icon on the Title column opens https://commons.wikimedia.org/wiki/Commons:File_naming in a new tab.

🤖 Generated with Claude Code

Merge request reports

Loading