Skip to content

feat(bazaar): robust legacy schema support, instant local previews, and Freelens recommendations - #805

Open
castrojo wants to merge 5 commits into
mainfrom
docs/bazaar-skills-and-tests
Open

feat(bazaar): robust legacy schema support, instant local previews, and Freelens recommendations#805
castrojo wants to merge 5 commits into
mainfrom
docs/bazaar-skills-and-tests

Conversation

@castrojo

@castrojo castrojo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR resolves all longstanding Bazaar local development issues and integrates the new Freelens Kubernetes dashboard app:

  1. Fixed PNG Color & Pixel Loss: Replaced deprecated djxl -C sRGB flag with --color_space=sRGB to properly render converted banners with full colors and pixel data.
  2. Fixed Systemd & Terminal Hangs: Changed bazaar.service type from oneshot to simple (and removed RemainAfterExit=yes) so the background daemon immediately launches without blocking systemctl.
  3. Automated Host Banners: Integrated automatic, non-root podman JXL-to-PNG decoding into the local just bazaar-preview and ujust bazaar-preview commands, ensuring host previews are fully populated with banners.
  4. Isolated Changelog Tests: Fixed test_changelog.bats failure path when bctl is installed locally on the developer's host.
  5. Integrated Freelens: Ported the recommended app.freelens.Freelens Kubernetes client into the curated Developers list in curated.yaml.

Summary by CodeRabbit

  • New Features

    • Bazaar preview now includes banner image conversion and installation when the required source assets are available.
    • A new app entry was added to the curated Bazaar selections.
  • Bug Fixes

    • Improved Bazaar service startup behavior for more reliable preview and reload handling.
    • Updated image conversion settings to use the current recommended option format.
  • Documentation

    • Refreshed Bazaar guidance with updated local preview steps, warnings, and troubleshooting notes.
  • Tests

    • Strengthened validation around changelog and tag-reference checks.

@castrojo
castrojo enabled auto-merge July 1, 2026 14:28
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR changes the djxl color-space flag to a long-form option, adds a conditional JXL-to-PNG banner conversion step in two Justfile recipes, switches bazaar.service to Type=simple, adds an appid to curated.yaml, rewrites bazaar skill docs, broadens OCI tag-skipping logic with a new test, and isolates test PATH setup.

Changes

Bazaar banner conversion and service changes

Layer / File(s) Summary
djxl color-space flag update
Containerfile
Switches the djxl invocation to use --color_space=sRGB instead of -C sRGB.
bazaar-preview banner conversion step
Justfile, system_files/bluefin/usr/share/ublue-os/just/system.just
Adds a conditional block that runs a podman container to convert *.jxl banners to *.png via djxl/libjxl-tools, installs PNGs into /etc/bazaar, and cleans up temp files.
bazaar.service type change
system_files/bluefin/usr/lib/systemd/user/bazaar.service
Changes Type from oneshot/RemainAfterExit=yes to simple.
curated.yaml appid addition
system_files/bluefin/etc/bazaar/curated.yaml
Adds app.freelens.Freelens to the Developers appids list.
bazaar skill docs rewrite
docs/skills/bazaar.md
Bumps version/description, updates "When NOT to use" guidance, and rewrites the local preview workflow, pitfalls, red flags, and verification sections.
OCI ref skip logic for e2e-pr tags
scripts/check-oci-refs.py, tests/test_check_oci_refs.py
Broadens tag-skipping to include e2e-pr-* tags and adds a unit test verifying the behavior.
Changelog test PATH setup
tests/test_changelog.bats
Sets PATH to MOCKDIR plus fixed system directories instead of prepending to the existing PATH.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Just as bazaar-preview recipe
  participant Podman
  participant Filesystem as /etc/bazaar

  Just->>Just: check branding dir exists
  Just->>Podman: run alpine container with djxl
  Podman->>Podman: convert *.jxl to *.png
  Just->>Filesystem: sudo install generated PNGs
  Just->>Just: remove temp directory
Loading

Possibly related PRs

Suggested labels: kind/documentation, area/bling, area/testing, size:L

Suggested reviewers: ahmedadan, hanthor

Poem

A rabbit hopped by the banner shed,
Swapped a flag, converted JXL to PNG instead 🐇
Simple now the service runs,
Freelens joins the curated ones,
With docs refreshed and tags in line,
This burrow's build is looking fine! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main Bazaar-related changes, especially local preview automation and the added Freelens recommendation.
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.
✨ 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 docs/bazaar-skills-and-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@castrojo
castrojo requested review from a team and repires as code owners July 1, 2026 14:29
hanthor
hanthor previously approved these changes Jul 1, 2026

@hanthor hanthor 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: Approved ✅

Well-structured PR. Verified:

  • djxl -C--color_space=sRGB — correct fix for newer libjxl
  • bazaar.service Type=oneshotType=simple — correct for persistent daemon
  • Freelens added in correct spot in curated.yaml
  • bazaar-preview podman-based preview workflows added to both Justfile and system.just
  • test_changelog.bats PATH hardened for test isolation
  • docs/skills/bazaar.md v1.0→v1.1 rewrite with canonical format (version, tags, last_updated), Common Pitfalls, Red Flags, and Verification checklist

All 7 commits by castrojo use Conventional Commits with proper attribution.
🟡 Minor note: alpine:latest (no SHA) used in preview scripts — low risk for dev tooling, but SHA pinning would improve reproducibility.

@castrojo

castrojo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Note for future selves, we'll replace all the containers like alpine with fsdk ones - there's so many everywhere that will take an audit but it unblocks us.

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

🧹 Nitpick comments (2)
docs/skills/bazaar.md (1)

87-87: 📐 Maintainability & Code Quality | 🔵 Trivial

Minor wording redundancy.

"blank/empty spaces" is redundant; "blank spaces" or "empty spaces" alone suffices.

🤖 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 `@docs/skills/bazaar.md` at line 87, The wording in the curated layout note is
redundant because “blank/empty spaces” repeats the same idea. Update the
sentence in the bazaar skills docs to use only one term, such as “blank spaces”
or “empty spaces,” while keeping the PNG banner and /etc/bazaar context intact.

Source: Linters/SAST tools

Justfile (1)

33-49: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated conversion logic between Justfile and system.just.

This ~15-line podman/djxl conversion block is copy-pasted almost verbatim into system_files/bluefin/usr/share/ublue-os/just/system.just's bazaar-preview. Consider extracting it into a shared script (e.g. scripts/bazaar-jxl-to-png.sh) invoked from both recipes to avoid drift when the conversion logic needs updating (as this PR itself just did for the -C/--color_space flag).

🤖 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 `@Justfile` around lines 33 - 49, The JXL-to-PNG conversion logic in the
Justfile is duplicated elsewhere and will drift when updated. Extract the
podman/djxl block from the Justfile into a shared script (for example, a bazaar
conversion helper) and have both the current Justfile recipe and the
bazaar-preview recipe in system.just call that shared helper so the conversion
behavior stays consistent in one place.
🤖 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.

Nitpick comments:
In `@docs/skills/bazaar.md`:
- Line 87: The wording in the curated layout note is redundant because
“blank/empty spaces” repeats the same idea. Update the sentence in the bazaar
skills docs to use only one term, such as “blank spaces” or “empty spaces,”
while keeping the PNG banner and /etc/bazaar context intact.

In `@Justfile`:
- Around line 33-49: The JXL-to-PNG conversion logic in the Justfile is
duplicated elsewhere and will drift when updated. Extract the podman/djxl block
from the Justfile into a shared script (for example, a bazaar conversion helper)
and have both the current Justfile recipe and the bazaar-preview recipe in
system.just call that shared helper so the conversion behavior stays consistent
in one place.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ed50033-e2af-4eeb-8850-0e134ef0d863

📥 Commits

Reviewing files that changed from the base of the PR and between 4f3f8f5 and 74c7651.

📒 Files selected for processing (9)
  • Containerfile
  • Justfile
  • docs/skills/bazaar.md
  • scripts/check-oci-refs.py
  • system_files/bluefin/etc/bazaar/curated.yaml
  • system_files/bluefin/usr/lib/systemd/user/bazaar.service
  • system_files/bluefin/usr/share/ublue-os/just/system.just
  • tests/test_changelog.bats
  • tests/test_check_oci_refs.py

@castrojo castrojo closed this Jul 2, 2026
auto-merge was automatically disabled July 2, 2026 03:19

Pull request was closed

@castrojo castrojo reopened this Jul 2, 2026

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

This PR currently has merge conflicts with the base branch and can't be merged as-is. Could you rebase / resolve the conflicts? Happy to re-review once it's mergeable — the change itself looks reasonable.

Jorge Castro and others added 5 commits July 27, 2026 21:43
- Replaced djxl `-C sRGB` with `--color_space=sRGB` to fix missing content in PNG conversions.
- Changed bazaar.service `Type=oneshot` to `Type=simple` and removed `RemainAfterExit=yes` to prevent systemctl from hanging indefinitely on startup.
- Cleaned the PATH in test_changelog.bats setup() to isolate tests from host-installed bctl, unblocking local development test runs.

Assisted-by: Gemini 3.5 Flash via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Integrated automated podman-based JXL-to-PNG conversion in `just bazaar-preview` and `ujust bazaar-preview`.
- This ensures host preview displays populated banners in io.github.kolunmi.Bazaar without requiring local host-installed `djxl`.

Assisted-by: Gemini 3.5 Flash via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Documented sRGB conversion guidelines and the podman-based local conversion loop.
- Specified Type=simple and no-window daemon lifecycle constraints for systemd integration.
- Standardized file triggers, pitfalls, and verification criteria against the canonical /addyosmani/agent-skills spec.

Assisted-by: Gemini 3.5 Flash via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin docker.io/library/alpine in the bazaar-preview podman containers to
the same SHA already used by the Containerfile build stage.

Assisted-by: Claude Sonnet via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo
castrojo force-pushed the docs/bazaar-skills-and-tests branch from 74c7651 to d8cbfa7 Compare July 28, 2026 01:48
@castrojo

Copy link
Copy Markdown
Contributor Author

@hanthor rebased onto current origin/main, resolved the conflicts, and pinned the alpine preview image to the same SHA used in the Containerfile build stage. Ready for re-review — thanks!

@castrojo castrojo added 4-review A pull request is awaiting review. and removed area/bling labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4-review A pull request is awaiting review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants