fix(manual-entry): restore single-client lock by dropping force_selectable - #753
Merged
evilguy4000 merged 1 commit intoSep 8, 2026
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 testtest_manual_entry_shows_single_client_prefilledfail on a clean checkout (assert 'readonly' in html).Root cause
manual_entry.htmlpassesforce_selectable=Trueto theclient_selectmacro. That flag short-circuits all three single-client-lock branches incomponents/client_select.html, so the 1-client case never renders the locked, pre-filled input.Fix
Drop
force_selectable=Truefrom the macro call. Thesearchableandcan_createarguments 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_prefilledtest_manual_entry_shows_select_when_multiple_clientsRan the seven manual_entry-related suites together (76 tests) — all green, no regressions.