Skip to content

Redesign the API home page as a navigable table directory (LMFDB#4964)#40

Open
roed-math wants to merge 1 commit into
mainfrom
ai/t46-api-homepage
Open

Redesign the API home page as a navigable table directory (LMFDB#4964)#40
roed-math wants to merge 1 commit into
mainfrom
ai/t46-api-homepage

Conversation

@roed-math

Copy link
Copy Markdown
Owner

The /api index was a flat dump of hundreds of table names. This PR turns it into a
directory: tables are grouped into datasets with human-readable topic names (so it is clear
what e.g. hgcwa stands for), each table shows its row count and its short description (the
tables.<name> knowl), and a small client-side filter box plus a jump-to-dataset strip make
the page searchable (it degrades gracefully without JS). The long query-syntax documentation
is collapsed into a details block, the stats and access-options pages are linked from the
top and the sidebar, and test tables are now really hidden by default — /api/all (whose
show_hidden flag was previously dead code) shows them. The page stays server-rendered and
fast: row counts are the in-memory meta_tables totals and all descriptions come from a
single bulk knowl query, so there are still no per-table queries at page load; all existing
URLs and the JSON/YAML output are unchanged. Verified with the api test suite (7 passed,
including two new tests), timing and link checks through the flask test client, and a live
browser check of the filter; git merge-tree confirms it merges cleanly with the
outstanding api PRs from this series. Addresses LMFDB#4964.

🤖 Generated with Claude Code

Group the tables on /api into datasets with human-readable names (so hgcwa
etc. are explained), show row counts (free: in-memory meta_tables totals)
and short table descriptions (one bulk query of the tables.<name> knowls
via a new knowldb.get_table_descriptions), add a client-side filter box and
a jump-to-dataset strip, collapse the long usage docs into a <details>
block, link the stats and access options pages, and actually hide test
tables by default (the show_hidden flag and /api/all were dead code).
All existing URLs and machine formats are unchanged.

Verified with the flask test client (page loads in ~0.16s warm; all 193
table links resolve; JSON/YAML output unchanged), in a live browser on
port 38046 (filter, no-match state and details work with no console
errors), sage -python -m pytest lmfdb/api/test_api.py (7 passed) and
pyflakes.  git merge-tree confirms no conflicts with open PRs #17/#18/#22.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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