Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

Commit 1a301c4

Browse files
committed
refactor(app-shell): key the object canvas's entry reading on its values, dependency-complete
The memo read `entry.filters` while keyed on its serialisation, which needed an inline lint suppression the lint script does not honour (`--no-inline-config`). It now reads the filters back from the key it is keyed on. Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z Co-authored-by: Claude <noreply@anthropic.com>
1 parent 709c527 commit 1a301c4

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

‎packages/app-shell/src/views/studio-design/studio-canvas-preview.tsx‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,10 @@ export function StudioObjectRecordsCanvas({ name }: StudioCanvasPreviewProps) {
186186
const navId = entry?.navId;
187187
const filtersKey = JSON.stringify(entry?.filters ?? null);
188188
const entryViewName = entry?.viewName;
189-
const target = React.useMemo(
190-
() =>
191-
navEntryListTarget(
192-
name,
193-
{ navId, filters: entry?.filters, viewName: entryViewName },
194-
{ currentUserId, currentOrgId },
195-
),
196-
// eslint-disable-next-line react-hooks/exhaustive-deps
197-
[name, navId, filtersKey, entryViewName, currentUserId, currentOrgId],
198-
);
189+
const target = React.useMemo(() => {
190+
const filters = (JSON.parse(filtersKey) as StudioCanvasNavEntry['filters'] | null) ?? undefined;
191+
return navEntryListTarget(name, { navId, filters, viewName: entryViewName }, { currentUserId, currentOrgId });
192+
}, [name, navId, filtersKey, entryViewName, currentUserId, currentOrgId]);
199193
// Read only for an entry that names a view: a plain entry asks the metadata
200194
// cache for nothing, as before.
201195
const metadata = useMetadata();

0 commit comments

Comments
 (0)