Skip to content

Merge main into ledgertests#452

Merged
Heliodex merged 110 commits into
ledgertestsfrom
main
Apr 29, 2026
Merged

Merge main into ledgertests#452
Heliodex merged 110 commits into
ledgertestsfrom
main

Conversation

@Heliodex
Copy link
Copy Markdown
Member

No description provided.

Heliodex and others added 22 commits March 25, 2026 12:47
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…/Site/typescript-6.0.2

Bump typescript from 5.9.3 to 6.0.2 in /Site
…ROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS.
…CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS. IMPROVED MERCURY CSS."

This reverts commit ed8db7c.
Bumps [@types/nodemailer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer) from 7.0.11 to 8.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nodemailer)

---
updated-dependencies:
- dependency-name: "@types/nodemailer"
  dependency-version: 8.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…/Site/types/nodemailer-8.0.0

Bump @types/nodemailer from 7.0.11 to 8.0.0 in /Site
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 16:11
@Heliodex
Copy link
Copy Markdown
Member Author

Deployment error perhaps due to the (not specifying which) GitHub Actions outage

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

This PR merges main into ledgertests, bringing in a broad set of updates across the Site service, SurrealDB schema/queries, configuration structure, and documentation (notably around SurrealDB v3, client TLS constraints, and suite services like Orbiter/Launcher).

Changes:

  • Restructures Mercury Core configuration (adds DomainInsecure, groups Database/Economy/Orbiter), and updates many HTTP URLs accordingly.
  • Migrates SurrealDB usage and schema/SurrealQL patterns (computed fields, defaults, type::record, new helper functions like fn::currentContent/fn::search).
  • Expands docs and updates dependencies / tooling (Site + Docs packages, Database image).

Reviewed changes

Copilot reviewed 120 out of 124 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
mercury.core.ts Config shape restructure + defaults
Site/src/routes/notifications.surql SurrealQL scoping update
Site/src/routes/api/render/update/[taskId=taskid]/+server.ts Surreal client API update usage
Site/src/routes/api/avatar/[username]/+server.ts Add bounded wait timeout logic
Site/src/routes/(rbxclient)/game/tools/thumbnailasset/+server.ts Surreal update API usage
Site/src/routes/(rbxclient)/game/join/join.surql SurrealQL scoping updates
Site/src/routes/(rbxclient)/game/join/+server.ts Dedicated join host/port logic updates
Site/src/routes/(rbxclient)/game/host/+server.ts Switch to DomainInsecure URLs
Site/src/routes/(rbxclient)/game/gameserver/+server.ts Switch to DomainInsecure base URL
Site/src/routes/(rbxclient)/game/[id=asset]/serve/+server.ts Switch to DomainInsecure URLs
Site/src/routes/(rbxclient)/asset/characterfetch/[username]/user.surql Wearing query rewrite
Site/src/routes/(rbxclient)/asset/characterfetch/[username]/+server.ts Switch to DomainInsecure URLs
Site/src/routes/(rbxclient)/asset/+server.ts XML detection helper + URL substitution
Site/src/routes/(plain)/register/createUser.surql Remove explicit admin field
Site/src/routes/(plain)/register/+page.server.ts Stop passing admin param
Site/src/routes/(plain)/recover/code/+page.server.ts Surreal update API usage
Site/src/routes/(plain)/recover/+page.server.ts Await email sending
Site/src/routes/(plain)/+page.server.ts Use version().version
Site/src/routes/(main)/user/[username]/user.surql Use fn::currentContent + comment listing
Site/src/routes/(main)/user/[username]/+page.svelte UI shows “Latest comments”
Site/src/routes/(main)/user/[username]/+page.server.ts Update types for new query shape
Site/src/routes/(main)/settings/updateProfile.surql fn::currentContent description compare
Site/src/routes/(main)/settings/+page.server.ts Surreal update API usage
Site/src/routes/(main)/search/searchUsers.surql Switch to fn::search
Site/src/routes/(main)/search/searchPlaces.surql Switch to fn::search + fn::filterGames
Site/src/routes/(main)/search/searchGroups.surql Switch to fn::search
Site/src/routes/(main)/search/searchAssets.surql Switch to fn::search + type ordering
Site/src/routes/(main)/place/[id=asset]/placeId.surql SurrealQL scoping update
Site/src/routes/(main)/place/[id=asset]/[name]/settings/updateSettings.surql fn::currentContent compare
Site/src/routes/(main)/place/[id=asset]/[name]/settings/settings.surql fn::currentContent + scoping update
Site/src/routes/(main)/place/[id=asset]/[name]/settings/serverTicket.surql rand::guidrand::id
Site/src/routes/(main)/place/[id=asset]/[name]/settings/privateTicket.surql rand::guidrand::id
Site/src/routes/(main)/place/[id=asset]/[name]/settings/View.svelte Description type change (string)
Site/src/routes/(main)/place/[id=asset]/[name]/settings/+page.server.ts Surreal update API usage + types
Site/src/routes/(main)/place/[id=asset]/[name]/place.surql fn::currentContent + scoping update
Site/src/routes/(main)/place/[id=asset]/[name]/invalidatePlaying.surql Rely on relation defaults
Site/src/routes/(main)/place/[id=asset]/[name]/findPlace.surql SurrealQL scoping update
Site/src/routes/(main)/place/[id=asset]/[name]/+page.svelte Description type change + close button tweak
Site/src/routes/(main)/place/[id=asset]/[name]/+page.server.ts Orbiter URL config restructure
Site/src/routes/(main)/home/home.surql fn::currentContent + scoping update
Site/src/routes/(main)/groups/[group=strid]/members/members.surql SurrealQL scoping update
Site/src/routes/(main)/groups/[group=strid]/group.surql SurrealQL scoping update
Site/src/routes/(main)/games/games.surql SurrealQL scoping update
Site/src/routes/(main)/games/create/create.surql Remove explicit updated entry
Site/src/routes/(main)/forum/forum.surql Use fn::currentContent
Site/src/routes/(main)/forum/[category]/category.surql Use fn::currentContent
Site/src/routes/(main)/develop/create/createAsset.surql Add visibility + remove updated
Site/src/routes/(main)/develop/create/assetTypes.ts Add “Face” type
Site/src/routes/(main)/develop/create/+page.svelte Price display conditional on permission
Site/src/routes/(main)/develop/create/+page.server.ts Face upload logic + visibility + ratelimit gating
Site/src/routes/(main)/develop/+page.svelte Add “Faces” tab
Site/src/routes/(main)/comment/[comment=strid]/removeComment.surql Remove explicit updated
Site/src/routes/(main)/comment/[comment=strid]/comment.remote.ts Add asset slug encoding in info
Site/src/routes/(main)/comment/[comment=strid]/+page.svelte Derived query + breadcrumb fixes
Site/src/routes/(main)/character/+page.server.ts Await Surreal update for body colours
Site/src/routes/(main)/catalog/[id=asset]/[name]/settings/updateAsset.surql fn::currentContent compare
Site/src/routes/(main)/catalog/[id=asset]/[name]/settings/assetCheck.surql Simplify creator check
Site/src/routes/(main)/catalog/[id=asset]/[name]/settings/asset.surql fn::currentContent + scoping update
Site/src/routes/(main)/catalog/[id=asset]/[name]/settings/+page.svelte Description type change (string)
Site/src/routes/(main)/catalog/[id=asset]/[name]/settings/+page.server.ts Types updated + remove debug logging
Site/src/routes/(main)/catalog/[id=asset]/[name]/icon/asset.surql SurrealQL scoping update
Site/src/routes/(main)/catalog/[id=asset]/[name]/icon/+server.ts Re-render face thumbnails + thumbnail API update
Site/src/routes/(main)/catalog/[id=asset]/[name]/buy.surql SurrealQL scoping update
Site/src/routes/(main)/catalog/[id=asset]/[name]/asset.surql fn::currentContent + scoping update
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.svelte Pass likeForm into Comment component
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.server.ts Description type change (string)
Site/src/routes/(main)/catalog/[id=asset]/+page.server.ts Redirect uses encoded slug
Site/src/routes/(main)/admin/reports/reports.surql SurrealQL scoping update
Site/src/routes/(main)/admin/regkeys/create.surql type::record + rand::id
Site/src/routes/(main)/admin/regkeys/+page.server.ts Use AlreadyExistsError + errMessage
Site/src/routes/(main)/admin/moderation/assocreport.surql SurrealQL scoping update
Site/src/routes/(main)/admin/create/create.surql Remove explicit updated entry
Site/src/routes/(main)/admin/create/+page.server.ts Validate face XML + reuse buffer
Site/src/routes/(main)/admin/banners/+page.server.ts Table constants + errMessage + update API
Site/src/routes/(main)/admin/asset/asset.surql SurrealQL scoping update
Site/src/routes/(main)/admin/accounts/updatePassword.surql Case-insensitive update + boolean result
Site/src/routes/(main)/admin/accounts/+page.server.ts Improved error messaging + boolean result
Site/src/routes/(legal)/report/+page.server.ts Use errMessage for invalid user
Site/src/lib/server/xmlAsset.ts Minor asset type logic tweak
Site/src/lib/server/xml.ts New XML detection helper
Site/src/lib/server/validate.ts Add errMessage helper
Site/src/lib/server/surreal.ts Surreal v3 connection/schema init updates + table constants
Site/src/lib/server/orbiter.ts Orbiter config restructure
Site/src/lib/server/init.surql Major schema overhaul + new functions
Site/src/lib/server/imageAsset.ts thumbnail signature now takes ArrayBuffer
Site/src/lib/server/idToPort.ts Add proxy offset + adjust modulo
Site/src/lib/server/getSessionAndUser.surql fn::currentContent + session expiry handling tweak
Site/src/lib/server/email.ts Add SMTP secure config
Site/src/lib/server/createComment.surql Remove explicit updated entry
Site/src/lib/server/config.ts Config schema restructure
Site/src/lib/comment.ts Stronger typing for info union
Site/src/components/forms/Select.svelte Readonly options + simplified selected logic
Site/src/components/Comment.svelte Remove stray debug output line
Site/src/app.d.ts lastOnline type to Date
Site/package.json Dependency updates (SurrealDB v2 client, TS 6, SvelteKit, etc.)
Site/Caddyfile Add explicit insecure HTTP host binding
Docs/src/content/docs/services/site.md Update startup docs + Surreal version
Docs/src/content/docs/services/rcc.mdoc Clarify proxy env example
Docs/src/content/docs/services/orbiter.mdoc Add Orbiter start instructions + env example
Docs/src/content/docs/services/launcher.md New Launcher service docs
Docs/src/content/docs/services/database.md Update Surreal v3 logs + guidance
Docs/src/content/docs/install/surrealdb.md Update to SurrealDB v3
Docs/src/content/docs/install/index.md Expand install scope + add .NET
Docs/src/content/docs/install/go.md Update Go version guidance
Docs/src/content/docs/install/dotnet.md New .NET install page
Docs/src/content/docs/install/docker.md Minor wording tweak
Docs/src/content/docs/install/caddy.md Update Caddy version
Docs/src/content/docs/install/bun.md Update Bun version
Docs/src/content/docs/history.md Correct historical details/links
Docs/src/content/docs/guides/rccsetup.mdoc New RCC setup guide
Docs/src/content/docs/guides/prodsetup.mdoc Formatting cleanup
Docs/src/content/docs/guides/launchersetup.mdoc New Launcher setup guide
Docs/src/content/docs/guides/devsetup.mdoc Expand common issues section
Docs/src/content/docs/guides/coresetup.mdoc Update wording re: dedicated servers
Docs/src/content/docs/guides/config.mdoc New config guide
Docs/src/content/docs/design/mercury3.md New Mercury 3 vs Core overview
Docs/src/content/docs/design/client-tls.md New TLS design explanation
Docs/src/content/docs/architecture/stack.md Update stack overview
Docs/src/content/docs/architecture/launchers.md New platform-types overview
Docs/package.json Astro/starlight updates + bun x scripts
Database/Dockerfile SurrealDB image v3
Assets/schema.ts Config type updated for new config shape
Comments suppressed due to low confidence (1)

Site/src/lib/server/getSessionAndUser.surql:30

  • When the session is expired you DELETE $s but $s remains truthy, so the final object still returns session: record::id($s.id) even though the record was deleted. This can cause callers to treat an expired session as still present. Set $s = NONE after deleting (or restructure the logic so session is derived from an existence check after the delete).

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

Comment on lines +2 to +3
# todo: check ping is correct (server hasn't actually pung)
RELATE $user->playing->$place RETURN VALUE record::id(id);
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

Typo in comment: pungpinged (and the sentence reads a bit unclear). Since this is user-facing documentation for maintainers, it’s worth fixing.

Copilot uses AI. Check for mistakes.
Comment thread Docs/src/content/docs/services/launcher.md Outdated
Comment on lines +95 to +98
message(
form,
"Key created successfully! Check the Keys tab for your new key."
)
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

actions.create calls message(...) but doesn’t return it, so the action result becomes undefined and the superforms message won’t be delivered to the client. Return the result of message(...) (or errMessage(...)) from the action.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +45
await Promise.race([
new Promise<void>(resolve => {
try {
const watcher = fs.watch(path, () => {
watcher.close()
resolve()
})
} catch {
resolve()
})
} catch {
resolve()
}
})
}
}),
// ...but don't wait forever
new Promise(resolve => setTimeout(resolve, timeout * 1000)),
])
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

Promise.race can resolve via the timeout while the fs.watch watcher remains open (never closed), which can leak file descriptors and keep watching indefinitely. Ensure the watcher is always cleaned up (e.g., keep a reference and close() it when the timeout wins / in a finally, and clear the timeout when the watch wins).

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +40
function serverInfo(place: Session["place"]): ServerAddress {
if (!serverDedicated(place.dedicated)) return place

const url = new URL(config.Orbiter.PublicURL)
return {
serverHostname: url.hostname, // no scheme, the address doesn't usually have a path anyway
serverPort: idToPort(place.id) + proxyOffset, // select the proxy port rather than the port of the server itself
}
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

serverInfo() returns place directly for non-dedicated hosting, but place comes from SurrealQL with serverAddress/serverPort fields (see join.surql) — it does not have serverHostname. This makes serverHostname undefined for self-hosted joins. Either alias serverAddress AS serverHostname in the query, or map serverAddress -> serverHostname inside serverInfo, or keep the original serverAddress naming consistently.

Copilot uses AI. Check for mistakes.
Comment on lines 2 to 4
bodyColours,
(SELECT record::id(id) AS id
FROM ->wearing->asset).id AS wearing
SELECT VALUE record::id(id) FROM $this->wearing->asset AS wearing
FROM user WHERE username = $username;
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

This SurrealQL looks syntactically invalid: SELECT field lists can’t contain a bare SELECT VALUE ... FROM ... statement. Wrap it as a subquery expression and alias it (e.g. (SELECT VALUE record::id(id) FROM $this->wearing->asset) AS wearing) to return the array of wearing asset ids.

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 3
import { type } from "arktype"
import { ThrownError } from "surrealdb"
import { authorise } from "$lib/server/auth"
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

ThrownError is imported but never used. Remove the unused import to avoid TypeScript/biome no-unused-vars failures and keep the file clean.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
new Uint8Array(buf.slice(0, 7)).every(
(b, i) => b === xmlStart.charCodeAt(i) // we ont need unicote here but who care
)
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

Typo in the inline comment (we ont need unicote here but who care) makes this helper harder to read/maintain. Please fix the spelling/grammar (and consider using xmlStart.length instead of the magic number 7).

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Heliodex
Copy link
Copy Markdown
Member Author

Onya co-pylote

@Heliodex Heliodex merged commit d862fd8 into ledgertests Apr 29, 2026
2 checks passed
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