Skip to content

feat/v0.1.5: vector icons and coloured file status, with the licence shipped inside the archive - #4

Merged
Wokrlie merged 2 commits into
mainfrom
dev
Nov 1, 2026
Merged

Wokrlie merged 2 commits into
mainfrom
dev

Conversation

@Wokrlie

@Wokrlie Wokrlie commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Brings the Git panel up to 0.1.5: the file list now uses real vector icons and colour-coded status codes, and the plugin ships its own licence plus the third-party notices for that artwork inside the archive.

  • Base: main (9667a29)
  • Head: dev (0e824a3)
  • Commits: 2
  • Diffstat: 19 files changed, 966 insertions(+), 44 deletions(-)

What's new

Vector icons across the panel

  • The stage / unstage / stage-all / refresh controls are Lucide icons instead of the +, -, ⟳ characters.
  • Every file row leads with an icon for its kind of change.
  • The icon geometry is embedded in icons.py rather than shipped as files, so the plugin never depends on where its package is unpacked and the build stays byte-for-byte deterministic.
  • 12 icons, rasterized at runtime and cached (IconCache).

Coloured file status

  • The Git status code of each file is drawn in the colour of that change — added green, modified yellow, deleted red, untracked cyan, renamed blue, conflict orange.
  • The code keeps its Git spelling, so a dual state such as AM stays readable next to its icon.
  • Tooltips on the icon controls and on the status code.

Licence and third-party notices inside the archive

  • package/plugin_pages/LICENSE — the plugin's MIT licence, byte-identical to the repository root copy.
  • package/plugin_pages/license.md / license.zh-CN.md — the plugin's License page, carrying the MIT licence plus the Lucide (ISC) and Feather (MIT) notices.
  • The Engine renders this as a localized License tab in the plugin information. No extra dialog, no popup.
  • The usage page links to the online copy as plain URLs, because the Engine draws plugin pages as plain text and strips inline-link targets.

How it works

The icons are vector artwork that the Editor rasterizes at runtime. This rides on the Engine's LunaSVG-backed texture loader — a real capability, but not part of the documented plugin API. ImGui itself only draws raster textures, so there was no way to ship vector artwork inside a plugin before this.

TextureLoader.load_from_memory(data, name="", svg_max_size=0)   # SVG -> RGBA8
native.submit_imgui_texture(name, pixels, w, h, pinned=True)     # -> ImGui texture
ctx.image_button(id, native.get_imgui_texture_id(name), w, h)    # -> draw

If a future Engine release drops that capability, the panel falls back to text-only controls and everything else keeps working. This dependency is recorded under Dependencies in the changelog.

Because ctx.image / ctx.image_button have no tint parameter, the colour is baked into each icon's SVG stroke.

Licensing

  • Icon geometry: Lucide 0.544.0, ISC. plus and minus derive from Feather, MIT. Both are free for commercial use.
  • ISC and MIT both require the notice to travel with every copy of the artwork — which is why the notices now live inside the archive next to the plugin code, rather than only in the repository. A notice that exists solely in the repository does not satisfy that clause for installed copies.
  • Only one copy of each licence text exists; a test asserts the archive contents byte-for-byte so the copies cannot drift.

Verification

Check Result
python .infernux-dev/validate.py pass
python -m unittest discover -s tests 36 tests, OK (was 29)
package.py build twice byte-identical (sha256 equal), 66 560 bytes
package.py verify pass
package.py release-manifest --tag v0.1.5 pass; --tag v0.1.4 correctly rejected
Icon geometry vs upstream Lucide compared element-by-element, identical

New tests:

  • tests/test_icon_assets.py — SVG well-formedness, Lucide stroke conventions, status-table consistency, colour conversion.
  • tests/test_package_licenses.py — parses the InxPack table of contents and asserts the licence and both notices are in the archive, that the licence file matches the repository copy byte-for-byte, that no superseded notice copy remains, and that the usage pages point at the licence page.
  • tests/test_translation_contracts.py extended for the 25 keys.

Please test in the Editor

  1. Icons render in the panel — stage / unstage / stage-all / refresh buttons, and the status icon per file row.
  2. Status colours look right (added green, modified yellow, deleted red, untracked cyan, renamed blue, conflict orange).
  3. Tooltips appear on the icon controls and the status code, and do not stick to the wrong widget.
  4. Dual status such as AM still shows both letters, plus the icon.
  5. The License tab appears in the plugin information (Extensions/Plugins → Git Integration → License) and shows the MIT + Lucide + Feather texts.
  6. Fallback path: if the textures fail to load, the panel should degrade to text-only controls instead of drawing nothing.

Known caveats

  • The LunaSVG dependency is undocumented and may disappear in a future Engine release — hence the fallback.
  • Long file paths still overflow the row. Pre-existing behaviour, unchanged here.
  • The usage page's GitHub links point at main, so they only resolve once this PR is merged.

Commits

  • 7a83686 — feat: draw the panel with vector icons and coloured file status
  • 0e824a3 — feat: ship the plugin licence and icon notices inside the archive

After merge

  1. Merge dev into main.
  2. Tag v0.1.5 on the merge commit.
  3. CI's release job publishes wokrlie.git_integration.inxpkg and infernux-plugin-release.json.
  4. Rebuild locally from the tag and compare the sha256 against the published asset — it must be byte-identical.

The stage and unstage controls were text characters, and the Git status code of every file was drawn in the default text colour, so a list of changes read as an undifferentiated wall of paths.

Icons come from Lucide, which is free for commercial use under the ISC License. The geometry is embedded in the plugin and rasterized at runtime through the Engine's LunaSVG backend, so the package stays a single deterministic archive and one vector asset can be drawn in any colour.

The status code is now drawn in the colour of its change, and the leading icon repeats that meaning as a shape. The code keeps its Git spelling, so a dual state such as AM stays readable.

The icon buttons and the status code carry tooltips. An icon button is skipped while its texture is still uploading, which also keeps its tooltip attached to the right widget instead of drifting onto the previous one.

THIRD_PARTY_NOTICES.md records the licence of the artwork.
ISC and MIT both ask for their notice to travel with every copy of the
artwork, so the notices cannot live in the repository root alone: the
repository is not what the Editor installs. The licence file and the
notices now sit in the plugin package, next to the plugin code, and the
Engine renders them as the plugin's License page, so no extra UI is
needed to reach them.

The usage page also points at the online copy, written out as plain
URLs because the Editor draws plugin pages as plain text.
@Wokrlie
Wokrlie merged commit ef823b5 into main Nov 1, 2026
2 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.

1 participant