Skip to content

fix: reset themed cursor when sidecar type is null or omitted - #3

Closed
My-Denia wants to merge 3 commits into
base/upstream-39524549from
fix/cursor-type-null-reset
Closed

fix: reset themed cursor when sidecar type is null or omitted#3
My-Denia wants to merge 3 commits into
base/upstream-39524549from
fix/cursor-type-null-reset

Conversation

@My-Denia

@My-Denia My-Denia commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Cursor sidecar samples that store cursorType as JSON null, or omit the key, now reset to arrow instead of holding the last pointer or text state. Theme picker cells show both arrow and pointer when a pack has distinct art, so a pack is not previewed as arrow-only.

Related issue

Themed cursor remaining on pointer after a null or omitted type. This fork PR does not use a GitHub closing keyword.

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

Theme picker: Hello Kitty cell shows arrow and pointer; Default shows a single sprite.

Testing

  • Native compositor preview: pointer sprite at the earlier sample, arrow sprite after a null or omitted type.
  • Editor Cursor pane: Hello Kitty preview uses both sprites; Default uses one.

Copilot AI lite review requested due to automatic review settings September 2, 2026 02:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T03:47:40.204026Z 9b42e00 New commits
🔒 Security Review Completed 2026-09-02T02:08:39.771345Z 3e6bbad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

🟡 Changes recommended

The new CursorPane preview test does not pin the locale despite asserting English-only labels, making it prone to environment/order-dependent failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR fixes cursor-type reset behavior in the compositor when cursorType is null or omitted in the cursor sidecar, and improves the cursor theme picker preview so themes with distinct arrow/pointer artwork are represented accurately.

Changes:

  • Treat missing/null cursorType samples as a reset to "arrow" in CursorTrack::load, with a regression test.
  • Add themePickerPreviewAssets() and update the Cursor pane theme grid to optionally show both arrow and pointer preview sprites.
  • Add unit/UI tests covering theme preview asset selection and the Cursor pane preview rendering.
File summaries
File Description
src/lib/cursor/cursorThemes.ts Adds themePickerPreviewAssets() helper to determine arrow/pointer preview asset paths.
src/lib/cursor/cursorThemes.test.ts Adds unit tests for themePickerPreviewAssets() behavior across default, arrow-only, and a known dual-sprite theme.
src/components/ai-edition/RightPanes.tsx Updates cursor theme options to use multiple preview URLs and renders 1–2 preview images per theme cell.
src/components/ai-edition/NewEditorShell.module.css Adds layout styling for the multiple-preview container in cursor theme cells.
src/components/ai-edition/CursorPane.preview.test.tsx Adds a jsdom UI test asserting CursorPane theme cells render 1 vs 2 preview images.
crates/compositor/src/cursor.rs Resets semantic cursor type to "arrow" when cursorType is null/absent; adds a regression test.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +28 to +34
beforeEach(() => {
stubStorage();
});

afterEach(() => {
cleanup();
});
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e2b2107e-df61-4c99-9ef1-306a35a72eca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@My-Denia

My-Denia commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the upstream pull request getopenscreen#566

@My-Denia My-Denia closed this Sep 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b42e00f4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +139 to +142
let ct = match s.get("cursorType") {
Some(v) => v.as_str().filter(|label| !label.is_empty()).unwrap_or("arrow"),
None => "arrow",
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Log the required cursor compositor smoke test

Because this changes cursor-state selection used by native compositor preview/export, the repository requires a cursor-focused manual E2E slice and a results-log row identifying the build, platform, and skipped coverage; I checked technical-documentation/testing/manual-e2e-checklist.md, and there is no entry for this commit. Run the relevant native cursor preview/export checks on an available real platform and append the result, or log the checks as skipped with the environment reason, before treating the cross-platform behavior as verified.

AGENTS.md reference: AGENTS.md:L86-L90

Useful? React with 👍 / 👎.

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