Skip to content

Change explore page title color to primary#2984

Closed
qingqing-ux wants to merge 87 commits intogoplus:uifrom
qingqing-ux:color-test
Closed

Change explore page title color to primary#2984
qingqing-ux wants to merge 87 commits intogoplus:uifrom
qingqing-ux:color-test

Conversation

@qingqing-ux
Copy link
Copy Markdown
Collaborator

Summary

  • Update CommunityHeader title color from --ui-color-title (grey) to --ui-color-primary-main
  • Sync design file community-explore.pen with the color change

Test plan

  • Verify explore page title displays in primary color
  • Check visual consistency across community pages

🤖 Generated with Claude Code

cn0809 and others added 30 commits February 3, 2026 08:51
* provide estimated run duration when phase start to run

* optimize code

* fix backdrop generating tip

* simplify type check
The endpoint was deprecated in favor of `POST /aigc/task` with
`type: "removeBackground"`, which provides better reliability for
long-running operations.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
…t cases for asset gen (goplus#2796)

* Infer sprite rotationStyle based on sprite-gen settings & improve test cases for asset gen

* Add test cases for cancellation
…odal sessions (goplus#2799)

* persist selected item state across modal sessions

* apply xgopilot suggestions

* use ?? null instead of || null
* update aigc-spritecontent-settings api doc

* apply ai suggestions

* update

* fix example
* feat(spx-gui): include physics mode in Copilot context

* refactor(spx-gui): improve AIGC previews and refine editor navbar descriptions

* refactor(spx-gui): improve editor mode descriptions and simplify physics status

* refactor(spx-gui): rename physics to Physics in CopilotRoot
…sprite state (goplus#2801)

* generated animation auto bind to default state

* fix condition

* use inferred animation bindings from aigc

* fix type

* use animation gen-id instead of name

* fix type

* fix type assertion
…tools/spxls (goplus#2823)

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
…s#2825)

* fix(spx-gui): filter failed/incomplete tasks in asset-adoption

Only include successfully completed tasks when calling /aigc/asset-adoption.
This prevents 400 errors when the payload contains failed/incomplete task IDs.

- Modified getTaskIds() in animation-gen.ts, costume-gen.ts to check TaskStatus.Completed
- Modified recordAdoption() in sprite-gen.ts, backdrop-gen.ts to filter completed tasks

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* test(spx-gui): add tests for task status filtering in asset adoption

Add comprehensive test cases to verify that only completed tasks are
included in asset adoption and getTaskIds() methods:

- backdrop-gen.test.ts: Test recordAdoption filters by TaskStatus.Completed
- costume-gen.test.ts: Test getTaskIds filters by TaskStatus.Completed
- animation-gen.test.ts: Test getTaskIds with multiple tasks and mixed statuses
- sprite-gen.test.ts: Test recordAdoption with complex scenarios including
  failed and cancelled tasks

These tests ensure that the fix for goplus#2824 works correctly by preventing
HTTP 400 errors when failed/incomplete tasks are present.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* chore: revert package-lock.json changes

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* docs(spx-gui): add comments to getTaskIds methods explaining filtering behavior

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* fix(spx-gui): refactor tests to avoid accessing private fields

- Add helper methods to MockAigcApis (setTaskStatus, getLastTask, getTasksByType)
- Update all test files to use MockAigcApis instead of accessing private task fields
- This fixes TypeScript errors in CI where tests were accessing private properties

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* chore(spx-gui): fix prettier formatting in backdrop-gen.ts

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* refactor(spx-gui): simplify MockAigcApis API by exposing tasks directly

Remove helper methods (setTaskStatus, getLastTask, getTasksByType) from MockAigcApis
and let test code access the tasks Map directly. This provides a simpler, more flexible
API where tests can implement their own filtering and manipulation logic.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* refactor(spx-gui): use non-null assertions in tests for guaranteed values

Replace optional chaining (?.) and if checks with non-null assertions (!)
in test cases where values are known to exist. This makes the test code
more assertive and cleaner.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* chore(spx-gui): fix prettier formatting in test files

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* fix(spx-gui): use non-null assertions for cancel test scenarios

Apply non-null assertions (!) to lastRecord in cancel test scenarios
where we know the value exists after task cancellation.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* revert: remove all test case changes, keep only implementation changes

Remove all changes to test files as requested, keeping only the core
implementation changes that filter failed/incomplete tasks in asset adoption.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* refactor(spx-gui): simplify getTaskIds docstring comments

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

---------

Co-authored-by: xgopilot <noreply@goplus.org>
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>
* feat(spx-gui): add a configurable button to the custom transformer

* feat(spx-gui): add SpriteItem title visible icon

* feat(spx-gui): add sprite quick configuration UI

* feat(spx-gui): complete sprite quick config UI

* refactor(spx-gui): implement a new quick configuration system for widgets and sprites

* refactor(spx-gui): move update handling logic into SpriteNode and MonitorNode

* add keyboard movement sprite

* feat(spx-gui): the movement of a graphic element (sprite) controlled by the keyboard

* refactor(spx-gui): remove sprite basic config from editor panel

* style(spx-gui): replace transformer icon

* refactor(spx-gui): extract common config items and rename panels for improved modularity

* feat(spx-gui): add quick config to MapViwer

* refactor(spx-gui): modify QuickConfig style

* refactor(spx-gui): replace custom-transformer icons

* feat(spx-gui): make QuickConfig follow sprites

* refactor(spx-gui): fix QuickConfig centering

* refactor(spx-gui): refactor config type handling to pass specific data

* refactor(spx-gui): fix config UI positioning for transformed nodes

* refactor(spx-gui): refine quick config initialization and interaction

* refactor(spx-gui): remove transformer config

* refactor(spx-gui): enhance quick config stability with cleanup logic

* refactor(spx-gui): clean up code and add comments

* refactor(spx-gui): improve data flow in QuickConfig

* feat(spx-gui): unify sprite and widget quick config handlers

* refactor(spx-gui): rm ZOrderConfigItem from cached

* refactor(spx-gui): move quick-config panels and improve monitor node sync

* refactor(spx-gui): fix type-check

* refactor(spx-gui): refine sprite/widget transformation logic and fix jittering

* refactor(spx-gui): simplify quick config popup management

* feat(spx-gui): use LocalConfig for stage viewer nodes and quick config

* refactor(spx-gui): use standard transform events for nodes

* refactor(spx-gui): rename rotate to heading and refine quick-config logic

* refactor(spx-gui): improve transformer events and quick config interaction
…goplus#2830)

Add `displayName` to the `Project` schema and related endpoints:
- Add optional `displayName` to `POST /project` request body, which
  defaults to `name` if not provided
- Add optional `displayName` to `PUT /project/{owner}/{name}` request
  body
- Update `keyword` parameter in `GET /projects/list` to search by
  display name or name, and decouple its schema from `Project.name`

Add `displayName` to the `PUT /user` endpoint for updating user profile
information, and make the request body require at least one of
`displayName` or `description` instead of always requiring `description`.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
* Project interface extraction

* Fix usages

* Fix unit test
…plus#2840)

Update `UpdateSignedInUserParams` to accept `displayName` in addition
to `description`, requiring at least one of the two fields to align
with the updated `PUT /user` API.

In `EditProfileModal`, the display name field is now editable instead
of being a disabled input showing `user.displayName`. Add validation
to ensure the display name is not blank, and trim whitespace before
submitting.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
…uest body (goplus#2843)

Allow renaming a project by providing a new `name` in the update request
body.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
)

* mobile reminder

* browser version reminder

* use ua-parser-js 1.x

* fix version compare

* refactor code & optimize messages

* use bowser instead of ua-parser-js

* details

* update reminder tip
* fix(spx-gui): camera follow behavior on undo/redo

* Update spx-gui/src/components/editor/preview/stage-viewer/StageViewer.vue

Co-authored-by: xgopilot[bot] <231223108+xgopilot[bot]@users.noreply.github.com>

* refactor(spx-gui): optimize camera following in StageViewer

* refactor(spx-gui): simplify sprite selection watch in StageViewer

---------

Co-authored-by: xgopilot[bot] <231223108+xgopilot[bot]@users.noreply.github.com>
* Persistence for generation state

* Move history into editing
…nt (goplus#2861)

* fix(editor): revert moving History into Editing, add clarifying comment

Revert the change from f26e5bd that moved `History` into `Editing`.
History (undo/redo) tracks `SpxProject` files only, but `Editing` is
initialized with `SpxProjectWithGens` (which includes gen-state files).
Having `History` inside `Editing` would cause gen-state changes to pollute
the undo/redo stack, which is unintended.

Move `History` back to `EditorState` where it operates directly on the
base `SpxProject`. Add a JSDoc comment to `Editing` clarifying its
responsibility and the reason `History` lives outside of it.

Generated with codeagent
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* fix(editor): add TODO to suggest renaming Editing class

Adds a TODO comment in the JSDoc of the `Editing` class to suggest
renaming it to a more descriptive name (e.g., `ProjectSession` or
`EditingSession`) that better reflects its role.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>

* Revise TODO comment for Editing class renaming

Updated TODO comment to clarify the renaming suggestion for the Editing class.

---------

Co-authored-by: xgopilot <noreply@goplus.org>
Co-authored-by: nighca <1492263+nighca@users.noreply.github.com>
Co-authored-by: Hanxing Yang <nighca@live.cn>
… cleanups (goplus#2857)

* refactor(spx-gui): use computed for selected node and improve watcher cleanups

* refactor(spx-gui): optimize node transformer update mechanism

* refactor(spx-gui): use widthChange event for MonitorNode transformer updates
* Fix incorrect route sync before project loaded

* Avoid error on incorrect name in editor route
* chore: bump spx version to 2.0.0-pre.46

* chore: update spx-upgrader to include tools/ispx/ in Go module refresh
* feat(spx-gui): add maxFPS support to project config

* feat(spx-gui): add support for configurable maxFPS in SpxProject
…plus#2891)

- Update `ProjectRunner` to call `xbuilder_` AI bridge methods
- Remove deprecated unprefixed AI globals and keep only namespaced
  exports in ispx
- Simplify `backoffAttempts` cancellation by checking `ctx.Err()`
  directly
- Remove explicit `-tags canvas` from the ispx Wasm build command

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
plwhd and others added 20 commits March 19, 2026 17:28
…tools/spxls (goplus#2976)

Bump `github.com/goplus/xgolsw` in `tools/spxls` to `v0.17.0`
and refresh the module checksums after `go mod tidy`.

Sync `VITE_SPX_VERSION`, `install-spx.sh`, and the `tools/ai` and
`tools/ispx` modules to `2.0.0-pre.47.0.20260317084052-07546096faba` so
the runtime assets and local toolchain stay aligned with the dependency
versions pulled in by the `xgolsw` upgrade.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
Delete some unnecessary variables
Apply icon to page
- Optimize team-workflow.md with industry-standard structure
- Simplify pencil design draft reproduction workflow
- Update pr-template.md with clearer format and examples
- Remove redundant pr-checklist.md (covered by design-review-checklist)
- Remove pr_review.md (basic git tutorial, not project-specific)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename 'pencil design draft reproduction workflow.md' to 'ai-design-workflow.md'
- Simplify title and structure
- Use tables for input/output clarity
- Add component library link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Renamed files in ui/images/:
- 用户头像.png → avatar.png
- 项目运行.png → project-run.png
- 项目全屏.png → project-fullscreen.png
- 地图背景.png → map-bg.png
- builder使用.png → builder-usage.png

Updated all references in:
- ui/components/spx/builder-component.lib.pen
- ui/pages/spx/*.pen
- ui/pages/spx/demos/*.html

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Renamed files in ui/images/ to follow repository convention:
- Notification-2.gif → notification-2.gif
- Sprite-review.png → sprite-review.png
- Union.png → union.png
- XBuilder_icon1.jpg → xbuilder-icon1.jpg
- XBuilder_Icons_02.ttf → xbuilder-icons-02.ttf
- XBuilder_icon1.ttf → xbuilder-icon1.ttf
- ai canvas logo.png → ai-canvas-logo.png
- navbar bg.png → navbar-bg.png
- tutorial entry-filled.png → tutorial-entry-filled.png
- user bg.png → user-bg.png
- pubilsh-colorful.png → publish-colorful.png (also fixed typo)

Updated all references in components and pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardized font naming for consistency:
- File: xbuilder-icon1.ttf → xbuilder-icons-01.ttf
- File: xbuilder-icon1.jpg → xbuilder-icons-01.jpg
- name: XBuilder_Icons_01 → xbuilder-icons-01
- name: XBuilder_Icons_02 → xbuilder-icons-02
- fontFamily references updated accordingly

This ensures font logical names match physical filenames,
reducing confusion and maintenance errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
### Background

Improve file naming consistency and organization in spx design directory.

### Changes

- Rename editor files with editor- prefix (map-editor → editor-map, etc.)
- Keep community .pen files in ui/pages/spx/ with community- prefix
- Simplify internal node names (remove redundant prefixes like stage-editor-, sprite-editor-)
- Move demo HTML files to _sources/ subdirectory

### Scope

- ui/pages/spx/editor-map.pen
- ui/pages/spx/editor-sprite.pen
- ui/pages/spx/editor-stage.pen
- ui/pages/spx/community-*.pen
- ui/pages/spx/tutorial.pen
- ui/pages/spx/demos/

### Design System Impact

- [ ] Yes
- [x] No

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
### Background

Reduce image file size for better loading performance.

### Changes

- Compressed xbuilder-icons-01.jpg from 1886KB to 474KB (~75% reduction)

### Scope

- ui/images/xbuilder-icons-01.jpg

### Design System Impact

- [ ] Yes
- [x] No

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update CommunityHeader title color from grey to primary color,
syncing with design file changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@xgopilot
Copy link
Copy Markdown
Contributor

xgopilot bot commented Mar 25, 2026

This PR is a large feature accumulation branch (600 files), not just the title change. The actual work is substantial and well-structured: code editor generalization to IXGoProject, copilot tool-call streaming refactor, update checker via ETag, browser version detection, community user profile/avatar editing, and sprite gen model reorganization. New docs in docs/develop/generalization/ are accurate and match the implementation. A few targeted issues below.


const hasUpdate = this.currentEtag != null && this.currentEtag !== etag
// Initialize currentEtag on first check
if (this.currentEtag == null) this.currentEtag = etag
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

currentEtag is only set once (when null) and never updated after a change is detected. Once a new deployment is found, every subsequent poll will return hasUpdate = true (since currentEtag still holds the old value), causing onUpdate to fire on every interval until stop() is called. The ETag should be updated after detecting a change:

Suggested change
if (this.currentEtag == null) this.currentEtag = etag
const hasUpdate = this.currentEtag != null && this.currentEtag !== etag
this.currentEtag = etag
return hasUpdate

throw new Error('ETag header not found')
}

const hasUpdate = this.currentEtag != null && this.currentEtag !== etag
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The ETag is compared raw. PR #2979 (merged to dev) fixed a false-positive caused by weak ETag W/ prefixes — servers may return W/"abc" on one request and "abc" (strong form) on another, making them appear different even when the content is identical. This branch appears to be missing that normalization fix. Consider rebasing or cherry-picking commit e75e672e.

Suggested change
const hasUpdate = this.currentEtag != null && this.currentEtag !== etag
const normalizedEtag = etag.replace(/^W\//, '')
const hasUpdate = this.currentEtag != null && this.currentEtag !== normalizedEtag
this.currentEtag = normalizedEtag
return hasUpdate

| `EditorState` | Constructor takes `SpxProject`; `selected` / `selectResource` reference spx types | #2804 |
| `Runtime` | Constructor takes `SpxProject` | #2803 |
| `GenState` | Takes `SpxProject` | #2804 |
| `CodeEditor` | Takes `SpxProject`; deeply coupled to spx APIs | #2803 |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This row is stale relative to the changes in this very PR. The new xgo-code-editor/code-editor.ts introduced here already accepts IXGoProject instead of SpxProject, so CodeEditor is no longer "deeply coupled to spx APIs". The row should be removed from the "future work" table or moved to the "now framework-agnostic" table.

return
}

const check = async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check is an async function passed to setInterval, so JavaScript doesn't wait for it to complete before firing the next tick. If checkForUpdates() (a network request) takes longer than intervalMs, concurrent calls can overlap and race on this.currentEtag. Consider tracking in-flight state:

Suggested change
const check = async () => {
let inFlight = false
const check = async () => {
if (!navigator.onLine || inFlight) return
inFlight = true
try {
const hasUpdate = await this.checkForUpdates()
if (hasUpdate && this.updateCheckTimer != null) onUpdate()
} catch (error) {
capture(error, 'Failed to check for updates')
} finally {
inFlight = 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.

9 participants