Skip to content

refactor: simplify interfaces - #215

Open
Exeloo wants to merge 2 commits into
feat/add-cache-systemfrom
refactor/simplify-interfaces
Open

Exeloo wants to merge 2 commits into
feat/add-cache-systemfrom
refactor/simplify-interfaces

Conversation

@Exeloo

@Exeloo Exeloo commented Oct 30, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Simplify interfaces by reducing the amont of text, of sub buttons, and add button before more details.

How do you test this PR?

@Exeloo
Exeloo requested a review from Tchips46 as a code owner October 30, 2026 09:44
@github-actions github-actions Bot added documentation Improvements or additions to documentation apps:editor Related to Editor app packages:layout Related to Layout package packages:sdk Related to SDK package packages:settings Related to Settings package packages:ui Related to UI package plugins:code-editor Related to Code editor plugin plugins:console Related to Console plugin plugins:ecs Related to ECS plugin plugins:file-manager Related to File manager plugin plugins:git Related to Git plugin plugins:history-panel Related to History panel plugin plugins:scene Related to Scene plugin plugins:viewport Related to Viewport plugin labels Oct 30, 2026
@Exeloo
Exeloo added this pull request to stack #212 October 30, 2026 09:46

@Tchips46 Tchips46 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review: simplify interfaces (02aac04)

Line numbers are at this PR's head.

Must fix

1. The migration switches new users to "full" on their second load (packages/ui/src/workbench/setup/setup-workbench.ts:121-134)

  • When the layout came from a save, no scope holds layout.preset, and savedNames.length > 0, it writes 'full'.
  • Nothing ever writes simple for a new user. Their first layout change is saved after 500 ms (_set → _persist), so on the next load firstRun is false, a saved name exists, and the migration takes them for an existing user. From then on every new project and every Reset layout shows all panels, against layout.mdx:43.
  • Not caught because the migration has no test, and e2e resetLayout always writes 'full'.
  • Fix: whenever no scope holds a preset, write one: 'full' if !layout.firstRun && savedNames.length, otherwise 'simple'.

Should fix

2. The INTERNAL and TIMEOUT hints replace git's own messages with wrong ones (packages/ui/src/workbench/notification/describe-error.ts:23-28, reached from plugins/git/src/index.ts:44)

  • Every failed git command throws RpcError('INTERNAL', <git stderr>) (server-core/src/git/git-service.ts:445). A rejected push now says "Something went wrong in the editor server", with git's reason hidden behind Show details.
  • A stuck push throws RpcError('TIMEOUT', "git push got no answer from the remote… run it once in a terminal") (git-service.ts:434). The toast now says "The editor server took too long to answer", which is false, and the fix is hidden.
  • Fix: give the INTERNAL hint only when the message is the router's generic 'Internal error' (packages/rpc/src/router/router-entries.ts:26), and drop TIMEOUT from HINTS (the client's own timeout message is already plain).

3. usePreset writes the account scope, which a machine value outranks (setup-workbench.ts:107-118)

  • Example: Default layout set to "All panels" under This machine, then View › Layouts › Simple layout. The reset is simple, but the next Reset layout is full again.
  • Fix: write to settings.inspect(CoreSettings.layoutPreset).effectiveScope when it is account or machine.

4. The widget description field is missing from the plugin docs (docs/docs/plugins/manifest.mdx:84-96)

  • The table gained essential but not description, which four manifests already use. Add one row.

Nice to have

  • Tab tooltips (packages/ui/src/workbench/parts/TopBar.svelte:74, 92): a screen with no description gets a tooltip that repeats its own label, and the visually hidden description span inside the tablist is read twice in browse mode. Wrap in Tooltip only when there is a description, and give the span hidden (aria-describedby still reads it).
  • Lean: errorCodeOf (describe-error.ts:32) repeats apps/editor/src/lib/editor/error-description.ts:17 (errorCode), packages/settings/src/account-sync/account-sync-store.ts:27 and the codeOf helpers in the packages and settings-ui plugins. Keep one.
  • Docs (docs/docs/getting-started/create-your-first-project.mdx:41-43): the new paragraph splits the bullet list, and editor-overview.png still shows the full layout.

@Exeloo
Exeloo force-pushed the refactor/simplify-interfaces branch 2 times, most recently from 5bc886d to 7b1a1fc Compare November 1, 2026 14:27
@Exeloo
Exeloo force-pushed the refactor/simplify-interfaces branch from 7b1a1fc to 1e3b76c Compare November 1, 2026 14:52
- the default layout is written once for new users too, so a saved
  layout no longer turns them into full-layout users; users with other
  recent projects keep every panel
- choosing a layout writes the scope that holds the default
- git's own messages are kept on internal errors and timeouts
- a screen tab gets a tooltip only when it has a description
- docs: widget description, layout paragraph
@Exeloo
Exeloo force-pushed the refactor/simplify-interfaces branch from 1e3b76c to 8a1c6c6 Compare November 1, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps:editor Related to Editor app documentation Improvements or additions to documentation packages:layout Related to Layout package packages:sdk Related to SDK package packages:settings Related to Settings package packages:ui Related to UI package plugins:code-editor Related to Code editor plugin plugins:console Related to Console plugin plugins:ecs Related to ECS plugin plugins:file-manager Related to File manager plugin plugins:git Related to Git plugin plugins:history-panel Related to History panel plugin plugins:scene Related to Scene plugin plugins:viewport Related to Viewport plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants