Skip to content

opencodex-bar 1.0.1: reliable panel open, Accounts default - #516

Merged
ItsLemmy merged 1 commit into
noctalia-dev:mainfrom
wy3z:update-opencodex-bar-1.0.1-pr
Aug 30, 2026
Merged

opencodex-bar 1.0.1: reliable panel open, Accounts default#516
ItsLemmy merged 1 commit into
noctalia-dev:mainfrom
wy3z:update-opencodex-bar-1.0.1-pr

Conversation

@wy3z

@wy3z wy3z commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Plugin

  • Id: wy3z/opencodex-bar
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

OpenCodexBar is a bar indicator and attached panel for a local OpenCodex instance: account/quota/routing on Accounts, and request/cost history on Usage.

This 1.0.1 update fixes two UX bugs:

  • The panel always opens on Accounts. 1.0.0 started on Usage and kept the last tab because the panel runtime stays loaded after close.
  • Left-click uses a host [widget.actions] panel-toggle instead of a queued onClick(). The bar chip always draws the usage track, has a minimum size, and skips no-op re-renders so the hit target does not collapse after Control Center hide/show.

External dependencies

Unchanged from 1.0.0:

  • OpenCodex 2.31.0: polling uses authenticated GET requests. Confirmed account actions use PUT /api/codex-auth/active and POST /api/codex-auth/reset-credits/consume.
  • Admin token: read from OPENCODEX_ADMIN_AUTH_TOKEN, or from the configured admin_token_file if the environment variable is unavailable. The plugin writes no local files; confirmed account actions mutate OpenCodex state.
  • xdg-open: used by the link button to open the OpenCodex dashboard. It is called with an argument array rather than through a shell, and nothing else is spawned.

Plain HTTP is only allowed for loopback addresses. Anything remote has to use HTTPS.

Testing

Click-tested on Hyprland against a live OpenCodex setup with Noctalia v5.0.0:

  • Opening the panel from the bar widget after Control Center hide/show (the missed-click case).

  • Confirming the landing tab is Accounts on each open.

  • noctalia msg panel-toggle wy3z/opencodex-bar:panel

  • Tested on Niri

  • Tested on Hyprland

  • Tested on Sway

  • Tested on another compositor:

  • Noctalia version tested against: v5.0.0

  • Plugin API level: 24

Screenshots / Videos

Visual change is the Accounts landing tab and a slightly padded bar chip. Store thumbnail is unchanged. Same surfaces as 1.0.0:

Accounts

OpenCodex Accounts panel

Usage

OpenCodex Usage panel

Checklist

Ready-for-review requirement: Every box in this section must be checked. If any statement is not true, keep the
pull request as Draft. An explanation does not replace a required check.

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
Ready-for-review requirement: Every attestation below must be checked.

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

Left-click now uses a host panel-toggle action, the bar chip keeps a
stable hit target after Control Center hide/show, and the panel always
opens on the Accounts tab.
@ItsLemmy
ItsLemmy merged commit 0e85863 into noctalia-dev:main Aug 30, 2026
6 of 7 checks passed
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