Skip to content

Use shared universe in simple page wrappers - #28

Merged
SnorreFossland merged 1 commit into
alpha-prefrom
codex/shared-universe-page-wrappers
Jun 4, 2026
Merged

Use shared universe in simple page wrappers#28
SnorreFossland merged 1 commit into
alpha-prefrom
codex/shared-universe-page-wrappers

Conversation

@SnorreFossland

Copy link
Copy Markdown
Contributor

Summary

  • switch simple wrappers (about, table, videos, akmm-graphql) from whole-store connect(state => state) to selectSharedUniverseState
  • read layout user/focus/metis data from the shared universe boundary
  • remove broad Redux state injection from these pages

Verification

  • npm test
  • npm run build

Copilot AI review requested due to automatic review settings June 4, 2026 12:19
@vercel

vercel Bot commented Jun 4, 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 4, 2026 12:19pm

@SnorreFossland
SnorreFossland merged commit a21ab2e into alpha-pre Jun 4, 2026
3 checks passed

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 a set of “simple” Next.js page wrappers to stop injecting the entire Redux store via connect(state => state) and instead read the needed user/focus/metis state from the shared-universe selector boundary (selectSharedUniverseState). This aligns these wrappers with the newer shared-universe state shape and reduces broad state coupling.

Changes:

  • Replaced connect(state => state) usage with useSelector(selectSharedUniverseState) in about, table, videos, and akmm-graphql pages.
  • Updated Layout user wiring to pull from sharedUniverse.user rather than props.phUser.
  • Removed whole-store connect wrapping from these pages, relying on shared-universe selectors instead.

Reviewed changes

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

File Description
src/pages/videos.tsx Switches from connected whole-store props to selectSharedUniverseState for Layout user.
src/pages/table.tsx Removes whole-store connect and reads focus/user via shared-universe selector.
src/pages/akmm-graphql.tsx Replaces useSelector(state => state) + connect with shared-universe selector access for metis/user.
src/pages/about.tsx Removes whole-store connect and reads focus/user via shared-universe selector.

Comment thread src/pages/videos.tsx
Comment on lines +1 to 5
import { useSelector } from 'react-redux';
import Page from '../components/page';
import Layout from '../components/Layout';
import Link from 'next/link';
import SelectVideo from '../components/SelectVideo'
Comment thread src/pages/videos.tsx

// import { loadData } from '../actions/actions'

const page = (props: any) => {
Comment thread src/pages/table.tsx
Comment on lines 6 to 10
@@ -11,11 +9,16 @@ import Table from '../components/Table';
import SetContext from '../defs/ContextView'
import TasksHelp from '../components/TasksHelp'
// const model = (metis) && metis.models[0]
const data = useSelector((state:any) => state)
const metis = (data.phData) && data.phData.metis
const sharedUniverse = useSelector(selectSharedUniverseState);
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