Skip to content

Add a distinct "DEV" ribbon icon to side-by-side dev builds - #308

Open
ScottMorris wants to merge 3 commits into
mainfrom
feat/dev-build-icon
Open

Add a distinct "DEV" ribbon icon to side-by-side dev builds#308
ScottMorris wants to merge 3 commits into
mainfrom
feat/dev-build-icon

Conversation

@ScottMorris

Copy link
Copy Markdown
Contributor

Summary

  • scripts/build-android-dev.sh (pnpm build:android:dev) already gives dev builds their own package identifier (ca.liminalhq.threshold.dev) and display name ("Threshold Dev") so they install side-by-side with a real release, but both carried the exact same launcher icon -- easy to grab the wrong install off a home screen, especially with a real device sitting next to a dev one during testing.
  • Adds threshold-icon-dev.svg / threshold-icon-android-dev.svg at the repo root, mirroring the existing master icon pair (threshold-icon.svg / threshold-icon-android.svg) with a small "DEV" ribbon banner added across the bottom-right corner. The Android variant keeps the ribbon inside the adaptive-icon safe zone so it isn't cropped away by a launcher mask.
  • The ribbon's "DEV" lettering is built from plain filled paths/rects rather than an SVG <text> element. I initially used <text> and it looked correct locally, but it silently rendered as nothing at all inside the ghcr.io/liminal-hq/tauri-dev-mobile container this script actually builds with (confirmed by extracting the icon straight out of a real built APK) -- almost certainly a missing-font issue in that minimal image. Path/rect geometry has no such dependency.
  • scripts/build-android-dev.sh now stamps this icon onto gen/android right after it's regenerated for the .dev identifier, and right before the build step. This relies on an undocumented tauri icon behaviour (confirmed empirically, not documented): when its -o output resolves inside the Tauri project tree, it also patches any already-initialized mobile platform project's icons in place. gen/android is already force-restored to HEAD on script exit regardless of outcome, so this is exactly as safe as the existing identifier/name override.
  • Also adds apps/threshold/src-tauri/icons-dev/ as a committed, browsable reference set (generated via tauri icon, same structure as icons/) -- not read by the build itself, just documentation of what the dev icon set looks like and how to regenerate it if the base Threshold logo ever changes.

Verification performed

  • Ran scripts/build-android-dev.sh end-to-end twice (once before, once after the <text> → path-based fix), extracted the launcher icon directly from the resulting real APK each time, and visually confirmed the ribbon renders correctly at both the xxxhdpi foreground layer and the smallest (mdpi) flat/round icon.
  • Confirmed apps/threshold/src-tauri/gen/android is byte-identical to HEAD (git status clean) after each run -- the script's restore-on-exit trap is unaffected by the added step.
  • Side-by-side comparison of the real vs. dev icon shared directly in the session that produced this PR.

Testing checklist (device, whenever you have a chance)

  • pnpm build:android:dev (or bash scripts/build-android-dev.sh), then adb install the resulting APK next to a real release install
  • Confirm the dev build's home-screen icon (adaptive, masked) shows the "DEV" ribbon clearly and isn't confusable with the real app
  • Confirm the system app-info screen's icon (flat/legacy) also shows the ribbon
  • Confirm the real app's icon is untouched (git status clean under apps/threshold/src-tauri/gen/android after the build, both installs still distinguishable only by the ribbon, not by any other visual regression)

… builds

scripts/build-android-dev.sh already gives dev builds their own identifier and
display name so they can install side-by-side with a real release, but both
carried the identical launcher icon -- easy to grab the wrong install off a
home screen. Adds threshold-icon-dev.svg / threshold-icon-android-dev.svg (the
real Threshold mark plus a small path-based "DEV" ribbon in the bottom-right,
kept within the adaptive-icon safe zone) and wires the script to stamp them
onto gen/android right before building, using tauri icon's undocumented
in-place patch behaviour -- confirmed against a real containerized build,
including that SVG <text> silently fails to rasterize in that environment,
hence the ribbon lettering is built from plain paths/rects instead.
@ScottMorris ScottMorris added android Android toolchain and mobile CI concerns build Build related ui User interface developer-experience Developer experience and onboarding improvements labels Aug 18, 2026
The D was a solid filled blob with no interior hole, so it barely read as a
D. Rebuilt it (and e/v) from simple wall/rect segments instead of chamfered
polygons -- guarantees a real open counter and sidesteps the arc-radius bug
that caused the blob shape. Also switches from all-caps "DEV" to "Dev" per
feedback, with e/v sitting at x-height on D's baseline.
…ribbon

The hand-built wall/segment letterforms worked but looked crude next to the
rest of the icon. Converts actual "Dev" text set in Liberation Sans Bold to
plain path outlines (inkscape --actions=object-to-path) and bakes those in
instead -- a genuine sans-serif look with no runtime font dependency, so it
still can't hit the <text>-doesn't-rasterize problem this was built around.
Also restores the lettering to its original larger size within the ribbon.
@ScottMorris

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c422bc182

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread threshold-icon-dev.svg
stroke-width="2.2"
stroke-linecap="round"/>

<!-- Center dot -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use Canadian spelling in the SVG comment

This newly added comment uses the American spelling Center, while repository rules require Canadian English in all code comments; change it to Centre to keep the asset compliant.

AGENTS.md reference: AGENTS.md:L19-L29

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Android toolchain and mobile CI concerns build Build related developer-experience Developer experience and onboarding improvements ui User interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant