mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
fix: answer the round-33 nits on the hub route and the empty state
- `empty_state_view` is no longer logged for an archived-only workspace, which is not the state the counter measures. - `detail`'s fetcher keeps its last answer in a local instead of reading `detail.current`, a self-reference that typed the resource `any`. - `list_projects`' comment, including its authorization contract, is back on the handler rather than on the predicate inserted above it. - `listHubProjects` documents the 400 an instance with the hub disabled returns. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fRjnaHLwjpHN84gNNxah9
This commit is contained in:
co-authored by
Claude Opus 5
parent
1745573ec6
commit
d30bb8a82c
@@ -145,12 +145,16 @@
|
||||
// previous controller but `fetchHubProject` takes no signal, and nothing orders the
|
||||
// responses — so picking A, dismissing, then picking B can land A's name, author and
|
||||
// counts over an import that writes B.
|
||||
// Kept in a local rather than read back off `detail.current` inside `detail`'s own fetcher,
|
||||
// which makes the resource's type circular and resolves it to `any`.
|
||||
let lastDetail = $state<ImportProjectSummary | undefined>(undefined)
|
||||
const detail = resource(
|
||||
() => slug,
|
||||
async (s) => {
|
||||
if (!s) return undefined
|
||||
const fetched = await fetchHubProject(s)
|
||||
return s === slug ? fetched : detail.current
|
||||
if (s === slug) lastDetail = fetched
|
||||
return lastDetail
|
||||
}
|
||||
)
|
||||
let project = $derived<ImportProjectSummary | undefined>(
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
let newLinkEl: HTMLButtonElement | undefined = $state(undefined)
|
||||
|
||||
onMount(() => {
|
||||
logFeatureUsage('home', 'empty_state_view')
|
||||
// Only the empty case: the counter answers how many workspaces sit empty and what
|
||||
// their owners do next, and a workspace whose items are all archived is neither.
|
||||
if (!archivedOnly) logFeatureUsage('home', 'empty_state_view')
|
||||
})
|
||||
|
||||
// The catalogue is fetched when the picker opens, never on render: `disable_hub` says an
|
||||
|
||||
Reference in New Issue
Block a user