Repository navigation
feat: open any upstream's models from its row, and fetch missing lists without being asked - #49
Merged
Merged
Conversation
…s without being asked The model column showed "not fetched" for upstreams core had not asked yet, upstreams whose key was refused and upstreams that offer no list, and it kept showing it after core had fetched them: a background fetch finished without an event, so the page kept what it read at startup. Seeing an upstream's models meant edit, then models, then refresh. - The model cell is a button in every state but disabled. Its second line says fetching, failed (in the warning colour), no list, manual list or narrowed range, and a spinner shows while a fetch runs. - It opens a panel: models in range with price and context window, the ones out of range folded below, a filter past ten models, when and where the list came from, and a refresh button. A failure shows the reason with retry and edit; an upstream without a list points to the manual list. Every edit entry opens the upstream dialog on its model section. - Opening the upstream page asks core to fetch lists that are missing, failed or out of date, and models_changed reloads the overview, so counts appear as each answer lands. - The dialog's model section follows the fetch state: it reloads when an answer lands, waits instead of asking for a manual list while one is being fetched, and its badge says failed or no list instead of "not fetched". Pins ThinkWatch-Core v0.8.2 (ThinkWatch-Core#47), which reports the fetch status, the models_changed event and POST /models/refresh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The model column said "not fetched" for three different situations: an upstream core had not asked yet, one whose key was refused, and one that offers no model list. It also kept saying so after core had fetched the list. A background fetch finished without an event, so the page kept what it read at startup. Seeing an upstream's models meant edit, then the models section, then refresh.
The cell. It is a button in every state except disabled, and the whole block highlights on hover. The second line says what is going on:
The panel. Opening the cell shows:
A failure shows the reason, with retry and edit buttons. An upstream without a list points to the manual list. Every edit entry opens the upstream dialog on its models section.
Fetching without being asked. Opening the upstream page asks core to fetch lists that are missing, failed or out of date.
models_changedreloads the overview, so counts appear as each answer lands. No click is needed.The dialog's models section follows the fetch state:
Core dependency
Pins ThinkWatch-Core v0.8.2 (ThinkWatchProject/ThinkWatch-Core#47). It adds:
model_status,model_fetching,model_checked_at_msandmodel_erroron each upstream;models_changedevent;POST /models/refresh, which fetches what is missing, failed or expired and skips anything asked in the last minute.Test plan
pnpm typecheck,pnpm vitest run(including newmodelFacetests),pnpm buildcargo fmt --check,cargo clippy --all-targets -D warnings,cargo testagainst the v0.8.2 tagIsolated preview with real mouse clicks. It covers:
Real app on an isolated data directory with the new core. On start, the core logs and the overview showed:
A second page visit within a minute asked nothing.
🤖 Generated with Claude Code