Skip to content

v0.1.0-alpha.21

Pre-release
Pre-release

Choose a tag to compare

@guilhermeyo guilhermeyo released this 11 May 03:41
· 10 commits to main since this release
60c18a9

What's new

Big rule-form rework + an unsaved-changes modal that no longer leaves you stuck.

Rule form (Bitwarden-style picker, multi-pattern, live test URL)

  • One picker per kind, three inline segmented buttons instead of a pop-up dropdown: URL contém / URL começa com / Regex. All three visible, Tab focuses the row, ←/→ cycles the selection.
  • Multi-pattern in any kind. Each pattern is its own row with a × to remove; + Adicionar padrão appends a new one. Regex rules accept lists too (match_regex = ["...", "..."]).
  • URL começa com is new. Internally desugared into ^https?://(www\.)?<padrão> so it matches https://github.com/foo and https://www.github.com/foo but not https://acme.com/github.com/foo.
  • Live test URL field. Type a URL into "Testar com uma URL" and the form tells you which pattern matched (✓ bate no padrão 2) or that nothing matched (✗ nenhum padrão bate). Same matching the engine uses, so the form's verdict is what mclovin open <url> will actually do.
  • Inline hints under each input replace the old top tip-card. The match-kind hint changes with the selected kind, so it reads as plain-language documentation for the choice you just made.
  • Rótulo (was Descrição) is now label-less — placeholder names the field, a dim line below explains where it shows up in the rule list.
  • Full pt-BR / en / es-ES translations.

Unsaved-changes modal (NN/g-backed cleanup)

  • (Y) letter shortcut for Discard dropped — Y means "Yes", not "destroy my edits", and the conflict was the worst offender.
  • "Deixar pra depois" → "Salvar rascunho" (says what actually happens).
  • "Descartar" → "Descartar mudanças" (explicit verb).
  • One-line body under the title explains the choice.
  • 16px visual gap between the safe options and the destructive Descartar so a reflex Tab+Enter doesn't fall into it.
  • Default focus stays on the safest option (Continuar editando).

Keyboard navigation

  • Tab now walks MatchType → Pattern(0..N) → "+ Adicionar padrão" → Testar URL → Rewrite (regex only) → Abrir com → Rótulo → loop.
  • The + Adicionar padrão button gets an accent border when focused; Enter on it appends a row and focuses the new input (and scrolls to it).
  • Enter on every other field saves the form, same contract everywhere.

Rule list

  • Draft badge rascunho não salvorascunho pendente (no longer contradicts "Salvar rascunho").

Backward compat

Every existing rules.toml keeps loading and routing identically. The new match_type = "starts_with" field is optional; absence is treated as Contains. match_regex still accepts a bare string.

358 lib tests + 6 integration tests green.