Repository navigation
feat(studio): add "what data is available?" drawer to landing - #109
MikolajSzczepkowski wants to merge 3 commits into
Conversation
- Lists DFO holdings and core datasets as static copy - Links to Sources, or starts a canvas on the question (not past wall)
jm-rivera
left a comment
There was a problem hiding this comment.
@MikolajSzczepkowski @ramyamahalingamatode Hardcoding this information is not the right solution. Please look at how /data manages the question of what data do you have.
Please also make sure you're leveraging the API capabilities fully as we have built ways for you to get an up to date view of these things.
- Replace static copy with search catalogue counts and graph publishers - Cap the graph read at 3s so a cold graph never stalls the landing - Link each publisher to the Sources page filtered to it
MikolajSzczepkowski
left a comment
There was a problem hiding this comment.
Agreed, dropped the static copy: the drawer now reads the same two endpoints the Data pages use, GET /api/search/catalogue for the counts (as /data's starting point does) and GET /api/graph/sources for the publishers and their dataset counts (as /data/sources does)
|
Claude's automated review (Claude Code), posted from Jorge's account. It is a machine review, so treat each point as a lead to check. Performance and reliability
Correctness
UX
Comments
|
|
@MikolajSzczepkowski please see the automated review findings above |
- serve the overview from a route instead of loading it on the page - remember graph read failures for a minute and share in-flight reads - show the aid line and catalogue tiles; focus follow-up on workspace
|
Thanks, all addressed. The reads moved off the landing's first paint: both pages are back to the session read only, and the drawer fetches GET /api/data-availability when it opens, showing "Reading the catalogue…" meanwhile. The loader remembers a failed graph read for a minute and shares one in-flight read between concurrent callers, and the 3 s race (with its dangling promise) is gone. The drawer now reuses scopeLine, catalogueTiles and a new aidLine from lib/search/catalogue, so nothing is formatted twice and the indicator count reads "100K+" as on /data; the list is labelled "Sources" and matches the Sources page's chips. "Ask a follow-up" now lands focus in the workspace's follow-up field (ChatPanel autoFocus on entry from the landing, not on phones or shares). Comments rewritten as plain sentences. Verified headless against the dev API. |
What changed
Why
How it was tested
Linked issue
https://app.asana.com/1/9116197837664/project/1219967636350866/task/1219943150717427?focus=true
Closes #38
Screenshots
Before is dev at bf9232d on a local server against the dev API, and after is this branch at 3aa87b1 on a local server reading dev data through the staging website (the dev API refuses the drawer's unauthenticated server reads), both signed out, at 1440 by 900.