Skip to content

fix(manual-entry): restore single-client lock by dropping force_selectable - #753

Merged
evilguy4000 merged 1 commit into
DRYTRIX:mainfrom
MacJediWizard:upstream-fix/manual-entry-single-client
Sep 8, 2026
Merged

evilguy4000 merged 1 commit into
DRYTRIX:mainfrom
MacJediWizard:upstream-fix/manual-entry-single-client

Conversation

@MacJediWizard

Copy link
Copy Markdown
Contributor

Problem

On the manual time-entry form, an organization with exactly one client sees a full searchable <select> for the client field instead of the readonly, pre-filled control the single-client UX calls for. This also makes the existing regression test test_manual_entry_shows_single_client_prefilled fail on a clean checkout (assert 'readonly' in html).

Root cause

manual_entry.html passes force_selectable=True to the client_select macro. That flag short-circuits all three single-client-lock branches in components/client_select.html, so the 1-client case never renders the locked, pre-filled input.

Fix

Drop force_selectable=True from the macro call. The searchable and can_create arguments continue to serve the 0- and 2+-client cases; only the single-client lock is restored. One-line change.

Tests

tests/test_client_single_simplification.py (already in the tree) now passes:

  • test_manual_entry_shows_single_client_prefilled
  • test_manual_entry_shows_select_when_multiple_clients

Ran the seven manual_entry-related suites together (76 tests) — all green, no regressions.

…table

The manual time-entry form passed force_selectable=True to the
client_select macro. That flag bypasses all three single-client-lock
branches in components/client_select.html, so an org with exactly one
client rendered a full <select> instead of the readonly, pre-filled
control the single-client UX (and the existing regression test
test_manual_entry_shows_single_client_prefilled) expects.

Dropping the flag restores the lock for the 1-client case while
searchable / can_create continue to serve the 0- and 2+-client cases.
@evilguy4000
evilguy4000 merged commit 732bfa4 into DRYTRIX:main Sep 8, 2026
8 of 13 checks passed
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