Commit 8fbe85f
authored
feat: mental-models List view + /tags?source=mental_models (#1296)
* feat(api): list mental-model tags via /tags?source=mental_models
Adds a `source` query param to GET /v1/default/banks/{bank_id}/tags so the
same endpoint can list tags from either memory_units (default) or
mental_models. Mental-model tag suggestions previously had no API; the
alternative of a sibling /mental-models/tags route would have shadowed
GET /mental-models/{mental_model_id} for the literal id "tags".
Engine: new list_mental_model_tags method sharing a private
_list_tags_from_table helper with the existing list_tags.
Tests: covers the engine method (basic counts, wildcard) and an HTTP-level
check that source=mental_models reads from mental_models while default
remains memory_units.
* feat(control-plane): mental-models List view with tag filter
Adds a default split-pane "List" view to the Mental Models page (sidebar of
files + content on the right) and a reusable <TagFilterInput> with free-text
entry, debounced suggestions from the server, and chip selection.
Changes:
- Default Mental Models view is "List" (file/folder metaphor); the existing
card "Dashboard" view stays as a secondary toggle. Old "Table" view removed.
- Sidebar entries show name, source query subtitle, and relative refresh time.
- Tag filtering is server-side via the existing tags/tags_match params on
/mental-models; suggestions populate from /tags?source=mental_models.
- Memories (data-view) reuse the same TagFilterInput, gaining suggestions
it didn't have before.
- Adds proxy route for GET /tags (forwards optional source query param).
- TagFilterInput holds the caller's fetchSuggestions in a ref to keep the
debounce effect from refiring on every render when callers pass an inline
closure (which would otherwise loop).1 parent e97a5c9 commit 8fbe85f
19 files changed
Lines changed: 778 additions & 179 deletions
File tree
- hindsight-api-slim
- hindsight_api
- api
- engine
- tests
- hindsight-clients
- go
- api
- python/hindsight_client_api/api
- typescript/generated
- hindsight-cli/src
- hindsight-control-plane/src
- app/api/banks/[bankId]/tags
- components
- lib
- hindsight-docs/static
- skills/hindsight-docs/references
- developer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4323 | 4323 | | |
4324 | 4324 | | |
4325 | 4325 | | |
4326 | | - | |
| 4326 | + | |
| 4327 | + | |
4327 | 4328 | | |
4328 | 4329 | | |
4329 | 4330 | | |
| |||
4334 | 4335 | | |
4335 | 4336 | | |
4336 | 4337 | | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
4337 | 4342 | | |
4338 | 4343 | | |
4339 | 4344 | | |
| |||
4350 | 4355 | | |
4351 | 4356 | | |
4352 | 4357 | | |
| 4358 | + | |
4353 | 4359 | | |
4354 | 4360 | | |
4355 | 4361 | | |
4356 | 4362 | | |
4357 | | - | |
4358 | | - | |
4359 | | - | |
4360 | | - | |
4361 | | - | |
4362 | | - | |
4363 | | - | |
| 4363 | + | |
| 4364 | + | |
| 4365 | + | |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
4364 | 4379 | | |
4365 | 4380 | | |
4366 | 4381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6427 | 6427 | | |
6428 | 6428 | | |
6429 | 6429 | | |
| 6430 | + | |
| 6431 | + | |
| 6432 | + | |
| 6433 | + | |
| 6434 | + | |
| 6435 | + | |
| 6436 | + | |
| 6437 | + | |
| 6438 | + | |
| 6439 | + | |
| 6440 | + | |
| 6441 | + | |
| 6442 | + | |
| 6443 | + | |
| 6444 | + | |
| 6445 | + | |
| 6446 | + | |
| 6447 | + | |
| 6448 | + | |
| 6449 | + | |
| 6450 | + | |
| 6451 | + | |
| 6452 | + | |
| 6453 | + | |
| 6454 | + | |
| 6455 | + | |
| 6456 | + | |
| 6457 | + | |
| 6458 | + | |
| 6459 | + | |
| 6460 | + | |
| 6461 | + | |
| 6462 | + | |
| 6463 | + | |
| 6464 | + | |
| 6465 | + | |
| 6466 | + | |
| 6467 | + | |
| 6468 | + | |
| 6469 | + | |
| 6470 | + | |
| 6471 | + | |
| 6472 | + | |
| 6473 | + | |
| 6474 | + | |
| 6475 | + | |
| 6476 | + | |
| 6477 | + | |
| 6478 | + | |
| 6479 | + | |
6430 | 6480 | | |
6431 | 6481 | | |
6432 | 6482 | | |
6433 | 6483 | | |
6434 | 6484 | | |
6435 | 6485 | | |
6436 | | - | |
6437 | 6486 | | |
6438 | 6487 | | |
6439 | 6488 | | |
6440 | 6489 | | |
6441 | | - | |
6442 | 6490 | | |
6443 | 6491 | | |
6444 | 6492 | | |
6445 | | - | |
| 6493 | + | |
6446 | 6494 | | |
6447 | 6495 | | |
6448 | 6496 | | |
6449 | 6497 | | |
6450 | 6498 | | |
6451 | 6499 | | |
6452 | 6500 | | |
6453 | | - | |
6454 | 6501 | | |
6455 | 6502 | | |
6456 | 6503 | | |
6457 | 6504 | | |
6458 | 6505 | | |
6459 | 6506 | | |
6460 | 6507 | | |
6461 | | - | |
| 6508 | + | |
6462 | 6509 | | |
6463 | 6510 | | |
6464 | 6511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1501 | 1501 | | |
1502 | 1502 | | |
1503 | 1503 | | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1776 | 1776 | | |
1777 | 1777 | | |
1778 | 1778 | | |
1779 | | - | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
1780 | 1782 | | |
1781 | 1783 | | |
1782 | 1784 | | |
| |||
1797 | 1799 | | |
1798 | 1800 | | |
1799 | 1801 | | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1800 | 1818 | | |
1801 | 1819 | | |
1802 | 1820 | | |
| |||
2127 | 2145 | | |
2128 | 2146 | | |
2129 | 2147 | | |
2130 | | - | |
2131 | | - | |
| 2148 | + | |
| 2149 | + | |
2132 | 2150 | | |
2133 | 2151 | | |
2134 | 2152 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1797 | 1797 | | |
1798 | 1798 | | |
1799 | 1799 | | |
1800 | | - | |
| 1800 | + | |
1801 | 1801 | | |
1802 | 1802 | | |
1803 | 1803 | | |
| |||
1870 | 1870 | | |
1871 | 1871 | | |
1872 | 1872 | | |
1873 | | - | |
| 1873 | + | |
1874 | 1874 | | |
1875 | 1875 | | |
1876 | 1876 | | |
| |||
1943 | 1943 | | |
1944 | 1944 | | |
1945 | 1945 | | |
1946 | | - | |
| 1946 | + | |
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
| |||
0 commit comments