Commit 69d1506
Add searchable + faceted History browser (HIST.7)
The History tab was a single flat, time-ordered dropdown with no way to
find a past calculation. Add a client-side search + faceted filter above it.
- Text search by chemical name or formula, type-to-narrow. Name→formula
resolution (e.g. "benzene" finds C6H6 results) via a new curated
config.COMMON_NAME_TO_FORMULA map plus exact molecule-library name matches.
Both sources are precise: synonym/substring matching is deliberately avoided
so "benzene" can't drag in toluene or ethylbenzene.
- Facet chips/controls for calc type, method, basis, date range, and
converged status. All facets AND together.
- refresh_results_browser now caches each result's parsed result.json on
app._history_entries, so filtering re-narrows an in-memory list with no
per-keystroke disk access. filter_history_entries is a pure function; the
library/DB lookup for name resolution lives in the impure apply layer.
- Preserves the existing index-0 placeholder + value-preservation contract;
shows an explicit "no matches" option when every entry is filtered out.
Tests: TestHistoryHardeningHist7 in tests/test_app.py (22 tests) cover the
pure filter across every facet, name→formula resolution (including the
toluene/ethylbenzene false-positive guards), and apply_history_filter
end-to-end.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6c7e61c commit 69d1506
6 files changed
Lines changed: 767 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
907 | 914 | | |
908 | 915 | | |
909 | 916 | | |
| |||
1788 | 1795 | | |
1789 | 1796 | | |
1790 | 1797 | | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1791 | 1813 | | |
1792 | 1814 | | |
1793 | 1815 | | |
| |||
3512 | 3534 | | |
3513 | 3535 | | |
3514 | 3536 | | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
3515 | 3563 | | |
3516 | 3564 | | |
3517 | 3565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 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 | + | |
433 | 532 | | |
434 | 533 | | |
435 | 534 | | |
436 | 535 | | |
437 | 536 | | |
438 | 537 | | |
439 | 538 | | |
440 | | - | |
| 539 | + | |
| 540 | + | |
441 | 541 | | |
| 542 | + | |
442 | 543 | | |
443 | 544 | | |
444 | 545 | | |
| |||
0 commit comments