Conversation
Add new appearance system with GitHub inspired theme presets including light/dark variants with colorblind and tritanopia accessibility modes. Introduces new appearance configuration in settings with sync mode support and perscheme preset selection for light and dark schemes. Updates theme toggle UI to use sync terminology and adds visual preview cards for each appearance option. the new appearance preset system in ui/src/ui/* styling updates in ui/src/styles/* bundled preview assets in ui/src/assets/appearance/* supporting docs touchups in README.md and docs/reference/credits.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a46786b33a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| handle_rate_limit() { | ||
| local response="$1" | ||
| if echo "$response" | grep -q "API rate limit exceeded"; then | ||
| fatal "Error: GitHub API rate limit exceeded. Please try again later" |
There was a problem hiding this comment.
Define
fatal before using it in the Codacy wrapper
This script calls fatal in multiple failure paths, but no fatal function is defined anywhere in the file. When one of these paths is hit (e.g., GitHub API rate limit or missing downloader), the script aborts with fatal: command not found instead of a clear error message, which makes CI/debugging failures opaque and breaks intended error handling.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR introduces a two-layer appearance system on top of the existing OpenClaw theme families, adding GitHub-style surface palettes (default, dimmed, colorblind, and tritanopia variants for both light and dark) that can be selected independently per scheme slot. It also refactors the flat Key changes:
Issues found:
Confidence Score: 4/5
|
| bin_name="codacy-cli-v2" | ||
|
|
||
| # Determine OS-specific paths | ||
| os_name=$(uname) |
There was a problem hiding this comment.
set -e +o pipefail disables pipefail instead of enabling it
+o pipefail (with a +) disables the pipefail option, which is the opposite of what is likely intended. With pipefail disabled, a failed curl | grep or similar pipeline won't cause the script to exit even with set -e active, because set -e only checks the last command in a pipeline.
The conventional pattern to enable both errexit and pipefail is:
| os_name=$(uname) | |
| set -eo pipefail |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .codacy/cli.sh
Line: 10
Comment:
**`set -e +o pipefail` disables pipefail instead of enabling it**
`+o pipefail` (with a `+`) *disables* the `pipefail` option, which is the opposite of what is likely intended. With pipefail disabled, a failed `curl | grep` or similar pipeline won't cause the script to exit even with `set -e` active, because `set -e` only checks the last command in a pipeline.
The conventional pattern to enable both `errexit` and `pipefail` is:
```suggestion
set -eo pipefail
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b981f478c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
ui/src/ui/app-settings.ts
Outdated
| const resolvedScheme = | ||
| next === "sync" | ||
| ? resolveAppearanceScheme({ ...appearance, mode: next }) | ||
| : host.appearanceSingleScheme; |
There was a problem hiding this comment.
Preserve active scheme when entering single mode
When switching appearance mode to single, the resolved scheme is taken from host.appearanceSingleScheme instead of the currently active scheme. In the common case where users are in sync on a light OS and singleScheme is still the default dark, clicking “Single” immediately flips the UI to dark even though they only changed mode, which is an unexpected behavior change. Derive the initial single-mode scheme from the currently resolved/system scheme at the time of the toggle.
Useful? React with 👍 / 👎.
| }, | ||
| ], | ||
| diagnostics: [], | ||
| main |
There was a problem hiding this comment.
Remove undefined identifier from registry mock setup
The mock object now includes main as a shorthand property, but no main variable is defined in this module. That makes beforeEach throw ReferenceError: main is not defined, so this test suite fails during setup instead of validating provider resolution behavior.
Useful? React with 👍 / 👎.
- Fix appearance scheme resolution to use resolveAppearanceScheme consistently instead of fallback to host.appearanceSingleScheme - Update appearanceResolved state to use resolveAppearancePreset function for proper preset calculation - Fix storage.ts to use _mode parameter when available for theme mode fallback - Remove unused main property from test fixture in web-search-providers.runtime.test.ts - Improve bash error handling in codacy cli script with set -eo pipefail and fatal error function - Add missing resolveAppearancePreset import to app.ts - Ensure consistent appearance configuration handling across UI initialization
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8e50548c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| theme: next.theme, | ||
| themeMode: next.themeMode, | ||
| appearance, |
There was a problem hiding this comment.
Keep writing themeMode until the preload script is migrated
The settings payload now persists only appearance, but the pre-hydration bootstrap in ui/index.html still reads themeMode (and does not read appearance) to set data-theme before the app boots. After users save once on this version, themeMode disappears from localStorage, so first paint falls back to system mode and can render the wrong scheme/palette (notably for single mode and preset users) until Lit re-applies settings, causing a visible theme flash on every reload.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf6a1951f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if [ "$#" -eq 1 ] && [ "$1" = "download" ]; then | ||
| echo "Codacy cli v2 download succeeded" | ||
| else | ||
| eval "$run_command $*" |
There was a problem hiding this comment.
Invoke Codacy binary directly instead of via eval
The wrapper currently executes eval "$run_command $*", which re-parses all arguments in a shell context. This breaks valid inputs that contain spaces (for example, paths) and can execute shell metacharacters if they appear in forwarded arguments, so CI behavior depends on argument contents rather than the intended argv. Execute the binary with quoted argv forwarding instead (direct call with "$@") so arguments are passed verbatim.
Useful? React with 👍 / 👎.
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.git blame, prior PR, issue, or refactor if known):Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should have caught this. Otherwise write
N/A.User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.Security Impact (required)
Yes/No)Yes/No)Yes/No)Yes/No)Yes/No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No)Yes/No)Yes/No)Failure Recovery (if this breaks)
Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.