Skip to content

Conversation

@nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Feb 10, 2026

No description provided.

Copy link
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

Upgrades @geoprotocol/geo-sdk across the monorepo and aligns code with updated geo-sdk/GRC-20 type naming, while stubbing out removed Graph.createSpace functionality.

Changes:

  • Bump @geoprotocol/geo-sdk from ^0.3.0 to ^0.8.0 (lockfile + all package dependents).
  • Update value/property type strings (FLOAT64FLOAT, float64float, boolboolean) in mapping, publishing, and example apps.
  • Replace Graph.createSpace usage with placeholder warnings/alerts where the upstream API was removed.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates resolved dependency graph for geo-sdk and related transitive deps.
package.json Bumps root dependency on @geoprotocol/geo-sdk to ^0.8.0.
packages/typesync-studio/package.json Bumps geo-sdk dependency to ^0.8.0.
packages/hypergraph/package.json Bumps geo-sdk dependency to ^0.8.0.
packages/hypergraph/src/mapping/Mapping.ts Maps schema Number type to FLOAT instead of FLOAT64.
packages/hypergraph/test/mapping/Mapping.test.ts Updates expectation to FLOAT mapping.
packages/hypergraph-react/package.json Bumps geo-sdk dependency to ^0.8.0.
packages/hypergraph-react/src/prepare-publish.ts Updates published value type tags (bool/float64boolean/float).
packages/hypergraph-react/src/hooks/use-privy-auth-create-public-space.ts Replaces removed public-space creation with an alert-based placeholder.
packages/hypergraph-react/src/HypergraphAppContext.tsx Removes geo-sdk public-space creation call; logs a warning instead.
apps/privy-login-example/package.json Bumps geo-sdk dependency to ^0.8.0.
apps/privy-login-example/src/components/create-properties-and-types-todos.tsx Updates property dataType to FLOAT.
apps/privy-login-example/src/components/create-properties-and-types-event.tsx Updates property dataType to FLOAT.
apps/privy-login-example/src/components/create-events.tsx Updates value type to float.
apps/next-example/package.json Bumps geo-sdk dependency to ^0.8.0.
apps/events/package.json Bumps geo-sdk dependency to ^0.8.0.
apps/events/src/components/create-properties-and-types-todos.tsx Updates property dataType to FLOAT.
apps/events/src/components/create-properties-and-types-event.tsx Updates property dataType to FLOAT.
apps/events/src/components/create-events.tsx Updates value type to float.
apps/connect/package.json Bumps geo-sdk dependency to ^0.8.0.
apps/connect/src/components/CreateSpaceCard.tsx Replaces public-space creation with an alert placeholder.
.changeset/upgrade-geo-sdk-types.md Adds changeset describing type renames and createSpace stubbing.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +12
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return undefined;
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

usePrivyAuthCreatePublicSpace currently calls alert(...). This is problematic for a library hook because it introduces a hard browser dependency (will throw in SSR/Node where alert is undefined) and forces a UI side-effect on consumers. Prefer returning a typed error/Result or throwing an Error so callers can render their own UX (and consider deprecating/removing the hook if the feature is no longer supported).

Suggested change
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return undefined;
throw new Error('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +12
const [isLoading] = useState(false);

const createPublicSpace = async ({ name }: CreatePublicSpaceParams) => {
const accountAddress = privyIdentity?.accountAddress;
if (!accountAddress) {
throw new Error('No account address found');
}
try {
setIsLoading(true);
const { id } = await Graph.createSpace({
editorAddress: accountAddress,
name,
network: 'TESTNET',
});
queryClient.invalidateQueries({ queryKey: ['hypergraph-public-spaces'] });
setIsLoading(false);
return id;
} catch (error) {
setIsLoading(false);
throw error;
}
const createPublicSpace = async ({ name: _name }: CreatePublicSpaceParams) => {
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return undefined;
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

isLoading is created via useState(false) but the setter is removed, so it will always be false and cannot reflect the async operation state. Either remove React state entirely (use a constant) or restore setIsLoading and set it appropriately (even if the function now throws/returns an error).

Copilot uses AI. Check for mistakes.
Comment on lines 21 to 24
const createPublicSpace = async () => {
if (!accountAddress) {
alert('Missing account address');
return;
}

setIsLoading(true);

try {
await Graph.createSpace({
editorAddress: accountAddress,
name: spaceName,
network: 'TESTNET',
});
} catch (error) {
alert('Failed to create space');
console.error(error);
} finally {
setIsLoading(false);
queryClient.invalidateQueries({ queryKey: ['public-spaces'] });
}
alert('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
return;
};
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

createPublicSpace now no-ops with an alert(...) but the UI still offers a "public" option. Consider disabling/removing the public-space path until it’s re-implemented (or wire it to a real implementation) to avoid confusing users and to prevent repeated submissions since isLoading is never set for this branch.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +6
"@graphprotocol/hypergraph": patch
"@graphprotocol/hypergraph-react": patch
---

Update geo-sdk type names: float64 to float, bool to boolean. Replace removed Graph.createSpace calls with no-op alerts.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The changeset marks both packages as patch, but this PR removes/neutralizes public space creation behavior (and changes observable outputs like createPublicSpace becoming a no-op). If consumers rely on this functionality, this is a breaking behavioral change and likely warrants at least a minor (or major) bump and clearer release notes about the removed capability.

Suggested change
"@graphprotocol/hypergraph": patch
"@graphprotocol/hypergraph-react": patch
---
Update geo-sdk type names: float64 to float, bool to boolean. Replace removed Graph.createSpace calls with no-op alerts.
"@graphprotocol/hypergraph": minor
"@graphprotocol/hypergraph-react": minor
---
BREAKING: Update geo-sdk type names (float64 to float, bool to boolean) and remove public space creation behavior by turning Graph.createSpace calls into no-op alerts.

Copilot uses AI. Check for mistakes.
Comment on lines +963 to 968
const spaceId = Utils.generateId();

try {
if (smartSessionClient?.account) {
const result = await Graph.createSpace({
editorAddress: smartSessionClient.account.address,
name,
network: smartSessionClient.chain.id === Connect.GEO_TESTNET.id ? 'TESTNET' : 'TESTNET', // TODO: switch to mainnet
});
spaceId = result.id;
console.log('Created public space', spaceId);
}
} catch (error) {
console.error('Error creating public space', error);
if (smartSessionClient?.account) {
// TODO: Graph.createSpace has been removed. Public space creation needs to be re-implemented.
console.warn('Graph.createSpace has been removed. Public space creation needs to be re-implemented.');
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

createSpaceForContext previously attempted to create a public space via the geo-sdk when smartSessionClient.account was present; it now always proceeds without creating the corresponding public space and only logs a warning. If the rest of the app assumes the space exists publicly after this call, this will cause runtime behavior regressions—consider surfacing an explicit error/feature flag instead of silently continuing, or adjust upstream callers/UX to reflect that public spaces can’t be created right now.

Copilot uses AI. Check for mistakes.
@nikgraf nikgraf merged commit bd40ec3 into main Feb 10, 2026
12 checks passed
@nikgraf nikgraf deleted the upgrade-geo-sdk-2 branch February 10, 2026 16:29
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.

1 participant