Skip to content

refactor: add tanstack signal tanstack plugin, reorder files (@miodec)#7721

Merged
Miodec merged 9 commits intomasterfrom
dev-plugin
Mar 26, 2026
Merged

refactor: add tanstack signal tanstack plugin, reorder files (@miodec)#7721
Miodec merged 9 commits intomasterfrom
dev-plugin

Conversation

@Miodec
Copy link
Copy Markdown
Member

@Miodec Miodec commented Mar 25, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 25, 2026 22:53
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Mar 25, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Mar 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors frontend dev tooling by moving DevTools into a dedicated components/dev area and extending TanStack devtools with a custom “Core Signals” plugin to inspect app state.

Changes:

  • Export modalState store and wire it into a new signals devtools plugin.
  • Add components/dev/DevTools.tsx that lazy-loads TanStack devtools + dev options modal + Solid overlay only in import.meta.env.DEV.
  • Update mount to import DevTools from the new dev path and register the new plugin in TanStack devtools.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/ts/states/modals.ts Exports modal store tuple for external inspection (devtools).
frontend/src/ts/components/mount.tsx Points DevTools import to the new components/dev location.
frontend/src/ts/components/dev/TanstackDevtools.tsx Registers the new signals plugin alongside existing devtools plugins.
frontend/src/ts/components/dev/SignalsDevtools.tsx Adds “Core Signals” plugin UI for browsing key app signals/stores.
frontend/src/ts/components/dev/DevTools.tsx Adds DEV-only lazy-loaded dev tooling container (TanStack devtools + overlay + modal).

};

const [modalState, setModalState] = createStore<ModalState>({
export const [modalState, setModalState] = createStore<ModalState>({
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exporting setModalState makes the internal modal-store mutation API public (and it's not imported anywhere else). Prefer keeping the setter module-private and export only a read-only selector (or modalState alone) for devtools to avoid widening the state API surface.

Copilot uses AI. Check for mistakes.
if (typeof value === "number" || typeof value === "boolean") {
return `${value}`;
}
return JSON.stringify(value);
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatValue returns JSON.stringify(value) which is typed as string | undefined and can also throw (BigInt/circular refs). Under strict this won’t typecheck and can crash the panel. Ensure this branch always returns a string (e.g., try/catch + fallback to String(value) when stringify fails/returns undefined).

Suggested change
return JSON.stringify(value);
try {
const json = JSON.stringify(value);
if (typeof json === "string") return json;
} catch {
// ignore and fall through to String(value)
}
return String(value);

Copilot uses AI. Check for mistakes.
Comment on lines +191 to +193
setFlashing(true);
setTimeout(() => setFlashing(false), 125);
},
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setTimeout in the reactive effect isn’t cleared on component cleanup, so unmounting the panel can leave pending timers and set state after unmount. Store the timeout id and cancel it in onCleanup (or use a debounced signal).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing labels Mar 25, 2026
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Mar 25, 2026
@Miodec Miodec changed the title refactor: add tanstack devtools plugin, reorder files (@miodec) refactor: add tanstack signal tanstack plugin, reorder files (@miodec) Mar 26, 2026
@Miodec Miodec merged commit 3cdaf09 into master Mar 26, 2026
17 checks passed
@Miodec Miodec deleted the dev-plugin branch March 26, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants