Skip to content

Preserve remote Mimris model focus#33

Merged
SnorreFossland merged 1 commit into
mainfrom
codex/preserve-remote-mimris-model-focus
Jun 19, 2026
Merged

Preserve remote Mimris model focus#33
SnorreFossland merged 1 commit into
mainfrom
codex/preserve-remote-mimris-model-focus

Conversation

@SnorreFossland

Copy link
Copy Markdown
Contributor

Summary

  • Preserve task-scoped current model/query refs in /model routes and remote Metis proxy calls.
  • Forward focus params through the Mimris remote-universe Metis API proxy.
  • Skip local Mimris memory restore when an explicit current-model focus request is present.

Verification

  • pnpm tsc --noEmit passed in the active Mimris checkout before the clean branch was created.
  • Temp clean branch has no local node_modules; direct tsc --noEmit there cannot run because tsc is not installed in that worktree.
  • Live proxy check confirmed Coffee Shop IRTV loads one current Coffee Shop model instead of the previous 4EM model.

# Conflicts:
#	src/pages/model.tsx
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mimris Ready Ready Preview, Comment Jun 19, 2026 2:54pm

@SnorreFossland SnorreFossland marked this pull request as ready for review June 19, 2026 14:54
Copilot AI review requested due to automatic review settings June 19, 2026 14:54
@SnorreFossland SnorreFossland merged commit 86d6790 into main Jun 19, 2026
2 checks passed
@SnorreFossland SnorreFossland deleted the codex/preserve-remote-mimris-model-focus branch June 19, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the /model page flow and the remote-universe Metis proxy so that explicit “current model / focus” requests are preserved end-to-end, rather than being overridden by previously stored local Mimris state.

Changes:

  • Adds a structured RemoteMetisFocusQuery and forwards focus-related query params through buildRemoteMetisProxyPath(...) into the remote-universe Metis API proxy.
  • Updates /model route building/updating to carry focus params, and skips restoring memorystate when an explicit focus request is present.
  • Updates the Next.js API proxy endpoint to append the allowed focus query params to the remote Metis request URI.

Reviewed changes

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

File Description
src/pages/model.tsx Parses focus query params, forwards them through route updates and remote proxy fetches, and conditionally skips local memory restore.
src/pages/api/remote-universe/[universeSlug]/metis.ts Forwards a whitelisted set of focus query params from the proxy request to the remote Metis endpoint.
src/components/utils/remoteUniverse.ts Introduces RemoteMetisFocusQuery and extends the proxy-path builder to include focus query params.

Comment thread src/pages/model.tsx
Comment on lines +96 to +102
const hasRequestedRemoteMetisFocus = (focusQuery?: RemoteMetisFocusQuery) =>
Boolean(
focusQuery?.modelScope === 'current' ||
focusQuery?.currentModelRef ||
focusQuery?.currentModelviewRef ||
focusQuery?.currentMetamodelRef,
);
Comment thread src/pages/model.tsx
Comment on lines +136 to 141
const updateModelRoute = (options: { universeId?: string; universeSlug?: string; baseUrl?: string; metisScope?: string; focusQuery?: RemoteMetisFocusQuery }) => {
const nextRoute = buildModelRoute(options);
const currentPath = typeof window !== 'undefined' ? `${window.location.pathname}${window.location.search}` : router.asPath;
if (currentPath === nextRoute) return;
router.replace(nextRoute, undefined, { shallow: true, scroll: false });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants