Skip to content

Refactor settings identifiers and UI test infrastructure#76

Merged
alexkroman merged 1 commit into
mainfrom
claude/last-24h-code-changes-egoh85
Jul 8, 2026
Merged

Refactor settings identifiers and UI test infrastructure#76
alexkroman merged 1 commit into
mainfrom
claude/last-24h-code-changes-egoh85

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

What & why

This change consolidates and clarifies how the app and UI tests share identifiers for the Settings window and its tabs:

  1. Centralize Settings tab labels: Move generalSettingsTab and advancedSettingsTab constants to the shared UITestIdentifiers enum (previously only in test support), then reference them in SettingsWindowRoot so the app and tests use the same strings by construction rather than duplicating them.

  2. Fix Settings window title aliasing: Update settingsWindowTitle in test support to reference generalSettingsTab instead of hardcoding "General", making the relationship explicit and maintainable.

  3. Improve selectSettingsTab robustness: Make the method return the retitled window proxy so callers can scope subsequent queries to it, avoiding stale element references when selecting a pane retitles the window. Update call sites in SettingsUITests to use the returned proxy.

  4. Extract SettingsPane component: Create a reusable wrapper for the grouped, non-scrolling form layout shared by both settings tabs, reducing duplication and ensuring consistent sizing.

  5. Simplify test fixtures and API surfaces:

    • Remove unused stt field from SessionFixture (transcriber behavior is fully determined at creation time)
    • Remove redundant baseURL parameters from AssemblyAITranscriber and APIKeyValidator initializers (they have sensible defaults)
    • Simplify UpdateCheckResult.upToDate to not carry redundant current version (already available to callers)
  6. Clarify documentation: Update comments in release scripts and test support to better explain the rationale for asset naming and checksums handling.

How it was tested

  • scripts/check.sh passes
  • Existing UI tests updated to use returned window proxy from selectSettingsTab
  • Existing unit tests updated for simplified UpdateCheckResult enum
  • No behavior changes; refactoring only

https://claude.ai/code/session_01UVM9P8YuMv3phFzcM1gvCQ

Reuse/altitude:
- Single-source the Settings tab labels in the shared UITestIdentifiers
  file (app tabItems + UI tests both reference them; the test bundle keeps
  only the framework-derived window-title aliasing).
- selectSettingsTab now returns the retitled window proxy, so the two
  Advanced-pane tests scope their queries to it instead of repeating an
  app-wide lookup with a copy-pasted rationale.
- Drop baseURL arguments from test helpers that restated the production
  defaults (APIKeyValidatorTests, AssemblyAITranscriberTests), removing a
  duplicated endpoint constant and two force-unwraps.

Simplification:
- UpdateCheckResult.upToDate no longer echoes the caller's own version
  back; UpdateCheckModel reads the version it already holds.
- Extract the shared SettingsPane form chrome used by both settings tabs.
- Remove the never-read stt field from SessionFixture.
- Fix docs orphaned by this window's removals: BLURTENGINE.md now points
  at HTTPTransport/FakeHTTPTransport (MockURLProtocol is gone), the UI-test
  README describes the shared UITestIdentifiers file instead of the deleted
  mirroring scheme, AGENTS.md matches the new UpdateChecker shape, and
  release-publish.sh justifies the versioned DMG upload by its live
  consumers (SHA256SUMS + publish verification) instead of the removed
  mxcl/AppUpdater.
- Correct GitHubRelease.dmgAsset's comment: the pipeline publishes the
  image under two names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVM9P8YuMv3phFzcM1gvCQ
@alexkroman alexkroman enabled auto-merge July 8, 2026 03:59
@alexkroman alexkroman added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit 75ca710 Jul 8, 2026
6 checks passed
@alexkroman alexkroman deleted the claude/last-24h-code-changes-egoh85 branch July 8, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants