Skip to content

Settings page with presets #6

Closed

Description

@ribeirogab

Parent

#1

What to build

The extension's Settings page, opened from the extension icon and from the menu. This ticket delivers the page frame, the scope and storage facts, the not-affiliated note, and the Presets section. Changes reach open pull request tabs at once.

Acceptance criteria

  • Selecting the extension icon opens the Settings page in a tab. There is no popup, and installation opens no page.
  • Settings in the menu opens the same page.
  • The page states that settings apply to every repository and are stored only in this browser, and that GitHub File Hider is not affiliated with GitHub.
  • Each preset can be turned on or off, and its rules can be added, edited, and removed, with validation messages for an empty pattern, a leading /, a backslash, ***, and a duplicate.
  • A preset whose rules differ from the defaults shows Modified, and Restore defaults restores them. An unmodified preset follows the default rules of the installed version (ADR 0003). Unit tests cover this.
  • Changes apply in open pull request tabs without a reload.
  • The page follows GitHub's settings layout and themes and is fully usable with the keyboard.

Blocked by

Activity

  1. self-assigned this
    on Oct 2, 2026
  2. ribeirogab commented on Oct 2, 2026

    @ribeirogab
    OwnerAuthor

    Update: the implementation was reverted in a619cac. This issue is reopened and its acceptance criteria are unchecked.

    Built the full-tab Settings page, editable presets with validation and Restore defaults, local storage notifications, keyboard editing, theme support, and scope/privacy copy. Chromium end-to-end tests exercise both the menu and the real extension action through the browser protocol. 44 unit tests and 12 end-to-end tests passed.

    Validation: pnpm check, pnpm typecheck, pnpm test (unit and fixture-routed Chromium end-to-end suites), and pnpm build passed.

    Commit: 6cf0a8d. No acceptance criteria deferred.

  3. ribeirogab commented on Oct 2, 2026

    @ribeirogab
    OwnerAuthor

    Built the full-tab Settings page (settings.html, options_ui with open_in_tab), ported from the prototype's Settings screen without its prototype bar and fake browser bar. The extension icon opens it through the service worker (no popup, nothing opens on install), and the menu's Settings and Custom rules items and the empty state's Edit rules open it in a new tab at the right section. The page states the scope and storage facts and that GitHub File Hider is not affiliated with GitHub.

    Each preset has its own switch, a rule list with add, edit, and remove, validation messages (empty, leading /, backslash, ***, duplicate), the Modified label, and Restore defaults (disabled with a tooltip when the rules match the defaults). Stored rules exist only while they differ from the installed defaults (ADR 0003, covered by unit tests). Every change is written to chrome.storage.local and reaches open pull request tabs without a reload. The page follows the prototype's keyboard behavior (focus restoration after edits, Esc cancels an edit) and the system light or dark theme.

    The page frame already includes the Custom rules and Always show sections and the General choices from the prototype; their behavior is verified in #7, #8, and #10.

    Tests:

    • End to end: 10 new tests (no page on install, the real extension action via the browser protocol, menu Settings, Edit rules, scope and disclaimer copy, preset switches, rule editing with every validation message, Restore defaults, live update of an open pull request, keyboard use).
    • Visual: 25 Settings scenes in light and dark (General, Presets, Custom rules, Always show, first install, modified, editing, edit and add errors, disabled Restore tooltip, rule hover, empty preset, empty lists, syntax help, saved indicator, focus and hover states) at zero different pixels. Total: 114 visual comparisons.

    Commit: e05f7a0.

  4. ribeirogab commented on Oct 3, 2026

    @ribeirogab
    OwnerAuthor

    Follow-up: the build script change that bundles settings-page.js, settings.css, settings.html and registers options_ui was missing from e05f7a0 and landed in 5fe0ee7. The tests ran against the complete working tree, so their results stand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified; an agent can pick it up

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions