Skip to content

feat: add dark mode package setting - #2

Merged
sabraman merged 1 commit into
mainfrom
codex/dark-mode-setting
May 15, 2026
Merged

feat: add dark mode package setting#2
sabraman merged 1 commit into
mainfrom
codex/dark-mode-setting

Conversation

@sabraman

@sabraman sabraman commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the Dark Mode example to publish a manifest-declared invert-screen setting. The package version is bumped to 0.1.2 and docs now point at the matching release archive path.

Validation

  • python3 ../marginalia-sdk/tools/validate_manifest.py --profile publish */manifest.json
  • python3 ../marginalia-sdk/tools/build_package.py dark-mode-theme --profile publish --output dist --json

Summary by CodeRabbit

  • New Features

    • Added "Invert screen" setting to the dark mode theme (enabled by default).
  • Documentation

    • Updated README and download links to reflect version 0.1.2.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Version 0.1.2 release update adds a new invertScreen boolean setting to the dark-mode theme manifest with default enabled. Manifest version is bumped and documentation updated across both README files, including the new setting description and corresponding release archive download URLs.

Changes

Version 0.1.2 Release

Layer / File(s) Summary
Manifest version and invertScreen setting
dark-mode-theme/manifest.json
Manifest version incremented from 0.1.1 to 0.1.2; new settings section added with boolean invertScreen setting labeled "Invert screen" defaulting to true.
README documentation and download link updates
dark-mode-theme/README.md, README.md
Dark Mode README updated to document the new "Invert screen" setting in the current behavior section. Download links in both README files updated from v0.1.1 to v0.1.2 release assets.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🐰 A tiny hop in version's stride,
New setting for screens, inverted with pride!
From 0.1.1 to 0.1.2 we go,
Downloads refresh with a version-y glow! 🌙

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'feat: add dark mode package setting' directly reflects the main change: adding a new invertScreen setting to the dark mode package manifest.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dark-mode-setting

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

@sabraman sabraman changed the title Add dark mode package setting feat: add dark mode package setting May 15, 2026

@sabraman sabraman left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dark-mode-theme/manifest.json`:
- Around line 20-27: Remove the unsupported top-level "settings" property from
the manifest—delete the entire object with id "invertScreen" (the "settings"
array and its "invertScreen" boolean entry) since manifest schema v1 disallows a
top-level "settings" field; if you need configurable options later, consult the
Marginalia SDK/schema for the correct mechanism and re-add via the supported
configuration approach.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 90554a9d-9d44-4d3f-ae47-ee26f169ee92

📥 Commits

Reviewing files that changed from the base of the PR and between 8025582 and 1cb8120.

📒 Files selected for processing (3)
  • README.md
  • dark-mode-theme/README.md
  • dark-mode-theme/manifest.json

Comment on lines +20 to +27
"settings": [
{
"id": "invertScreen",
"label": "Invert screen",
"type": "boolean",
"default": true
}
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for schema definition and settings-related validation rules

# Find schema definition files
fd -e json -e py schema

# Check if there's documentation for manifest settings
rg -n -C5 -i "settings.*property|manifest.*schema.*version" --type=py --type=json

# Look for examples or tests that use settings
rg -n "\"settings\"" --type=json -g '!dark-mode-theme/*'

Repository: marginalia-os/marginalia-examples

Length of output: 173


🌐 Web query:

Marginalia manifest schema version 1 settings property support

💡 Result:

I can’t answer this as stated because the query appears to mix terms from different projects/standards. 1) “Marginalia” (Emacs package) does not have a “manifest schema version 1 settings property” concept in the materials I found. The available Marginalia references are about Emacs UI annotation behavior, not a JSON/YAML manifest schema. 2) “MarginaliaSearch” (the Marginalia Search Engine) has configuration, but it’s expressed as properties files (e.g., conf/properties/system.properties), not as a “manifest schema version 1 settings property”. The documented configuration is a set of runtime properties like crawler.maxUrlsPerDomain, converter.poolSize, etc. [1] 3) Separately, “manifest schema version 1 settings property support” could refer to other ecosystems (e.g., Docker image manifest schema v1, Microsoft Copilot declarative agent manifests), but those are different from MarginaliaSearch/Marginalia. For example, Docker Registry manifest “schema version 1” is described in Docker’s schema1 package, which is not related to Marginalia’s configuration system. [2] If you tell me which “Marginalia” you mean (Emacs Marginalia vs MarginaliaSearch Engine) and what “manifest schema version 1” refers to (a file format? a specific URL/spec? a JSON/YAML example you have), I can re-research specifically whether and how a settings property is supported for that schema version. What I can confirm from the current research: - MarginaliaSearch Engine configuration is provided via a properties file (conf/properties/system.properties) rather than a manifest schema with a settings property. [1]

Citations:


🏁 Script executed:

#!/bin/bash

# Find the validation script mentioned in the original comment
find . -name "validate_manifest.py" -o -name "*schema*" -type f | head -20

# List manifest files to understand the pattern
find . -name "manifest.json" -type f

# Check the directory structure of the repo
ls -la

Repository: marginalia-os/marginalia-examples

Length of output: 1225


🏁 Script executed:

#!/bin/bash

# Get repository structure overview
git ls-files | grep -E "(manifest|schema|validate)" | head -30

Repository: marginalia-os/marginalia-examples

Length of output: 208


🏁 Script executed:

#!/bin/bash

# Read the dark-mode-theme manifest to see full structure
echo "=== dark-mode-theme/manifest.json ==="
cat dark-mode-theme/manifest.json

echo -e "\n=== reading-stats-module/manifest.json ==="
cat reading-stats-module/manifest.json

echo -e "\n=== hangman-app/manifest.json ==="
cat hangman-app/manifest.json

echo -e "\n=== game-of-life-sleep-screen/manifest.json ==="
cat game-of-life-sleep-screen/manifest.json

Repository: marginalia-os/marginalia-examples

Length of output: 3489


🏁 Script executed:

#!/bin/bash

# Check README for schema documentation
cat README.md

Repository: marginalia-os/marginalia-examples

Length of output: 1663


🏁 Script executed:

#!/bin/bash

# Check if marginalia-sdk is accessible as parent directory
ls -la ../ | head -20

# Try to find marginalia-sdk or schema definition
find .. -name "validate_manifest.py" -o -name "*schema*" 2>/dev/null | head -20

Repository: marginalia-os/marginalia-examples

Length of output: 712


🏁 Script executed:

#!/bin/bash

# Look for the marginalia-sdk repo in common locations
git -C .. remote -v 2>/dev/null || echo "Not a git repo"
ls -la ../marginalia-sdk 2>/dev/null || echo "No marginalia-sdk in parent"

# Check git history to see if there's info about validation
git log --oneline --all -20 2>/dev/null | head -10

Repository: marginalia-os/marginalia-examples

Length of output: 443


🏁 Script executed:

#!/bin/bash

# Check for CI workflows that might show validation output or configuration
find .github -type f -name "*.yml" -o -name "*.yaml" 2>/dev/null | xargs cat

# Look for any logs or output from validation
find . -name "*validate*" -o -name "*schema*" 2>/dev/null

# Check git show for the specific commit that added settings
git show 1cb8120 2>/dev/null | head -100

Repository: marginalia-os/marginalia-examples

Length of output: 4910


🏁 Script executed:

#!/bin/bash

# Check recent commits to see if there were any fixes after the initial addition
git log --oneline -20

# Check current git status
git status

# Check if there are any branches or pending changes
git branch -a

Repository: marginalia-os/marginalia-examples

Length of output: 557


🏁 Script executed:

#!/bin/bash

# Try to run the validation ourselves to see if it actually fails
# First, check if we can clone marginalia-sdk in a temp location
cd /tmp
git clone --depth 1 https://github.com/marginalia-os/marginalia-sdk.git 2>&1 | head -20

# Check if it succeeded
if [ -d marginalia-sdk ]; then
  echo "SDK cloned successfully"
  ls marginalia-sdk/tools/
fi

Repository: marginalia-os/marginalia-examples

Length of output: 275


🏁 Script executed:

#!/bin/bash

# Read the validate_manifest.py script to understand the schema
head -200 /tmp/marginalia-sdk/tools/validate_manifest.py

# Also check if there's a schema definition file
find /tmp/marginalia-sdk -name "*schema*" -o -name "*manifest*" 2>/dev/null | grep -E "\.(json|py)$"

Repository: marginalia-os/marginalia-examples

Length of output: 5214


🏁 Script executed:

#!/bin/bash

# Read the manifest schema
cat /tmp/marginalia-sdk/schema/manifest.v1.schema.json

# Also check if there's a specific theme schema
cat /tmp/marginalia-sdk/schema/theme.v1.schema.json 2>/dev/null || echo "No theme schema"

Repository: marginalia-os/marginalia-examples

Length of output: 3684


🏁 Script executed:

#!/bin/bash

# Now let's actually run the validation on the dark-mode-theme manifest
cd /tmp/marginalia-sdk

# Install dependencies if needed
pip install jsonschema -q 2>/dev/null

# Run validation on the dark-mode-theme manifest
python3 tools/validate_manifest.py --profile publish /root/marginalia-examples/dark-mode-theme/manifest.json

echo ""
echo "Exit code: $?"

Repository: marginalia-os/marginalia-examples

Length of output: 275


🏁 Script executed:

#!/bin/bash

# Find the correct path to the examples repo
find / -name "dark-mode-theme" -type d 2>/dev/null | head -5

# Check current location
pwd

# List what's in the current directory
ls -la dark-mode-theme/ 2>/dev/null || echo "Not in repo directory"

Repository: marginalia-os/marginalia-examples

Length of output: 412


🏁 Script executed:

#!/bin/bash

# Run from the correct location
cd /tmp/marginalia-sdk
python3 tools/validate_manifest.py --profile publish /root/marginalia-examples/dark-mode-theme/manifest.json 2>&1

# Or try the relative path from where we are
python3 tools/validate_manifest.py --profile publish ~/dark-mode-theme/manifest.json 2>&1 || true

# Check what's actually in root
ls -la ~ | grep -E "dark|margin"

Repository: marginalia-os/marginalia-examples

Length of output: 387


🏁 Script executed:

#!/bin/bash

# Run validation from the correct directory
cd /tmp/marginalia-sdk
python3 tools/validate_manifest.py --profile publish /home/jailuser/git/dark-mode-theme/manifest.json

echo "Exit code: $?"

Repository: marginalia-os/marginalia-examples

Length of output: 242


🏁 Script executed:

#!/bin/bash

# Also validate all examples in the git directory
cd /tmp/marginalia-sdk
python3 tools/validate_manifest.py --profile publish /home/jailuser/git/*/manifest.json

echo "Exit code: $?"

Repository: marginalia-os/marginalia-examples

Length of output: 412


Remove unsupported settings property from manifest.

The manifest schema version 1 does not support a top-level settings property. The validation fails with: "Additional properties are not allowed ('settings' was unexpected)". Remove lines 20-27 containing the settings property definition. If settings configuration is needed, verify the correct mechanism with the Marginalia SDK documentation or schema definition.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@dark-mode-theme/manifest.json` around lines 20 - 27, Remove the unsupported
top-level "settings" property from the manifest—delete the entire object with id
"invertScreen" (the "settings" array and its "invertScreen" boolean entry) since
manifest schema v1 disallows a top-level "settings" field; if you need
configurable options later, consult the Marginalia SDK/schema for the correct
mechanism and re-add via the supported configuration approach.

@sabraman
sabraman merged commit 96f76fa into main May 15, 2026
2 of 3 checks passed
@sabraman
sabraman deleted the codex/dark-mode-setting branch May 15, 2026 22:58
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.

1 participant