Commit 07e27fb
fix(web): stop double-marking manually overridden plan rate cells
Editable Import/Export rate cells were marked as overridden by two
independent signals that both render the same turned-F glyph: the
server-computed row.{import,export}_rate_adjust_type === 'manual'
(baked into the cell text before it reaches renderRateCell), and
renderRateCell()'s own isOverride check against the overrides array.
Both fire for the same single override, stacking two identical
markers - and since the Clear link is gated only on the second
signal, the two can disagree, leaving a marker with no working Clear
behind it until a restart.
The backend already replaces rather than stacks overrides correctly
(manual_select() in userinterface.py explicitly removes any existing
entry for the same time slot before adding a new one, confirmed via
a reporter's log showing the "Removed existing rate override..."
line firing correctly) - this was purely a rendering bug, not
duplicate stored state.
Fix: skip the adjust-type marker specifically for 'manual' when
editable, since renderRateCell already owns the marker + Clear UI
for that case. Other adjust types (offset/future/user/increment/
saving) are unrelated to the clickable-override mechanism and keep
their marker as before.
Also hardened toggleForceDropdown() with a null guard - a stale/
missing dropdown id would otherwise throw silently, indistinguishable
from a cell just not responding to clicks at all (a separate symptom
reported alongside the double marker, not yet root-caused).
New regression tests in test_plan_why_reason.py covering both.
Fixes #4474.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 003e4d3 commit 07e27fb
2 files changed
Lines changed: 59 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
507 | 540 | | |
508 | 541 | | |
509 | 542 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5997 | 5997 | | |
5998 | 5998 | | |
5999 | 5999 | | |
| 6000 | + | |
| 6001 | + | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
6000 | 6010 | | |
6001 | 6011 | | |
6002 | 6012 | | |
| |||
6493 | 6503 | | |
6494 | 6504 | | |
6495 | 6505 | | |
6496 | | - | |
| 6506 | + | |
| 6507 | + | |
| 6508 | + | |
| 6509 | + | |
| 6510 | + | |
| 6511 | + | |
| 6512 | + | |
| 6513 | + | |
6497 | 6514 | | |
6498 | 6515 | | |
6499 | 6516 | | |
6500 | 6517 | | |
6501 | 6518 | | |
6502 | | - | |
6503 | | - | |
| 6519 | + | |
| 6520 | + | |
| 6521 | + | |
6504 | 6522 | | |
6505 | 6523 | | |
6506 | 6524 | | |
| |||
6512 | 6530 | | |
6513 | 6531 | | |
6514 | 6532 | | |
6515 | | - | |
| 6533 | + | |
| 6534 | + | |
6516 | 6535 | | |
6517 | 6536 | | |
6518 | 6537 | | |
6519 | 6538 | | |
6520 | | - | |
6521 | | - | |
| 6539 | + | |
| 6540 | + | |
| 6541 | + | |
6522 | 6542 | | |
6523 | 6543 | | |
6524 | 6544 | | |
| |||
0 commit comments