diff --git a/CLAUDE.md b/CLAUDE.md index 75038d07..11e1bc9d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,7 +43,7 @@ Stores live under `app/stores/`: - `app/stores/windows.ts` + `app/stores/window/*` — the window manager. `WindowsStore` holds a z-index-ordered stack of `Window` objects, one per `WindowType` (enumerated in `app/interfaces/window.ts`); adding a window of an already-open type replaces it rather than stacking a duplicate. Rendered by `app/components/menu/gameWindow`. - `app/stores/menu.ts`, `session.ts`, `ticker.ts` — global UI/session/clock state. -Server communication flow: `app/lacuna.ts` exports the configured `@tlecommunity/client` singleton — typed endpoints as properties (`lacuna.empire.viewBoosts()`, `lacuna.body.getBuildings({...})`, `lacuna.buildingFromUrl(url).view({...})`), each resolving to `{ result, error }` rather than throwing. It also registers the one global `onResponse` handler, which routes status blocks into MobX, alerts on errors, and owns the captcha (1016) and empire-not-founded (1100) flows. `app/server.ts` is now just `splitStatus`. There is no `app/services/` layer any more; `app/queries/*` replaced it. +Server communication flow: `app/lacuna.ts` exports the configured `@tlecommunity/client` singleton — typed endpoints as properties (`lacuna.empire.viewBoosts()`, `lacuna.body.getBuildings({...})`, `lacuna.buildingFromUrl(url).view({...})`), each resolving to `{ result, error }` rather than throwing. It also registers the one global `onResponse` handler, which routes status blocks into MobX, alerts on errors, and owns the captcha (1016), empire-not-founded (1100) and session-expired flows. It deliberately does not enable the client's `enableRpcLimitHandler()` auto-retry: that suits unattended scripts, whereas here the user initiated the action and should see the RPC limit (1010) error, wait it out, and decide what to do next. `app/server.ts` is now just `splitStatus`. There is no `app/services/` layer any more; `app/queries/*` replaced it. Other structural pieces: diff --git a/app/components/menu/rightSidebar/bodiesAccordion.tsx b/app/components/menu/rightSidebar/bodiesAccordion.tsx index 61656086..0b841a54 100644 --- a/app/components/menu/rightSidebar/bodiesAccordion.tsx +++ b/app/components/menu/rightSidebar/bodiesAccordion.tsx @@ -42,7 +42,7 @@ class BodiesAccordion extends React.Component { items.push( ); diff --git a/app/queryClient.ts b/app/queryClient.ts index 4e008469..cc1445c7 100644 --- a/app/queryClient.ts +++ b/app/queryClient.ts @@ -35,9 +35,9 @@ const queryClient = new QueryClient({ gcTime: 5 * 60_000, // A LacunaError means the server answered with a business error - it has already been shown - // to the user by the global handler in app/lacuna.ts, and codes 1016/1100 have their own - // retry flows inside the client. Retrying those would double up the alerts. Only genuine - // transport failures are worth another go. + // to the user by the global handler in app/lacuna.ts, which also owns the captcha (1016), + // empire-not-founded (1100) and session-expired flows. Retrying those would double up the + // alerts. Only genuine transport failures are worth another go. retry: (failureCount, error) => !(error instanceof LacunaError) && failureCount < 1, // Every call counts against the server's RPC limit, which the UI displays in the bottom diff --git a/package-lock.json b/package-lock.json index 9aa22310..16f3f7b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@fortawesome/fontawesome-free": "^6.7.2", "@sentry/react": "^10.74.0", "@tanstack/react-query": "^5.102.8", - "@tlecommunity/client": "^1.9.2", + "@tlecommunity/client": "^1.10.0", "bulma": "^1.0.4", "classnames": "^2.5.1", "formik": "^2.4.9", @@ -3450,9 +3450,9 @@ } }, "node_modules/@tlecommunity/client": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@tlecommunity/client/-/client-1.9.2.tgz", - "integrity": "sha512-UvwxmgkmBIsh5F03c9LLugTYczgMQk3ubuzkN+IENwq/feHy9ghi/F7dXmj7KsZIB5ztNQY/PQoaKhLwJAl1cg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@tlecommunity/client/-/client-1.10.0.tgz", + "integrity": "sha512-Arj2Kcb3kl7fURP3aTVJZMHuTyFNgvSKdUX2ULhP1EF5ggJPm28XHH3NcMr0RZqDQQ29drETNlWkMGWaOhXjFA==", "license": "GPL-3.0-only", "dependencies": { "@types/lodash": "^4.17.25", diff --git a/package.json b/package.json index 77985e18..53c40218 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@fortawesome/fontawesome-free": "^6.7.2", "@sentry/react": "^10.74.0", "@tanstack/react-query": "^5.102.8", - "@tlecommunity/client": "^1.9.2", + "@tlecommunity/client": "^1.10.0", "bulma": "^1.0.4", "classnames": "^2.5.1", "formik": "^2.4.9",