From 2af6354076c5e55d62b189e0db7c6d865588e240 Mon Sep 17 00:00:00 2001 From: Babken Egoian <101829110+green2grey@users.noreply.github.com> Date: Mon, 6 Jul 2026 00:20:46 -0700 Subject: [PATCH] chore: rename app ID com.example.QuickView -> io.github.Green2Grey2.QuickView Placeholder ID replaced everywhere ahead of wider distribution: GTK application id, ProjectDirs qualifier triple in cache.rs, .desktop / metainfo / icon / Flatpak manifest filenames and contents, PKGBUILD install paths, templates, README icon path. Linux cache/config paths derive from the lowercased app name, so ~/.cache/quickview/ is unchanged and existing OCR cache entries stay valid (verified: cache hit after rename). Also drops the empty assets/icons/hicolor/256x256/ directory (packaging only installs the SVG). --- README.md | 2 +- adrs/ADR-0009-Caching.md | 4 ++-- ...sktop => io.github.Green2Grey2.QuickView.desktop} | 2 +- ...kView.svg => io.github.Green2Grey2.QuickView.svg} | 0 ... => io.github.Green2Grey2.QuickView.metainfo.xml} | 4 ++-- crates/quickview-core/src/cache.rs | 7 +++++-- crates/quickview-ui/src/lib.rs | 2 +- docs/PHASED_PLAN.md | 7 +++++-- packaging/arch/PKGBUILD | 12 ++++++------ ...iew.json => io.github.Green2Grey2.QuickView.json} | 8 ++++---- templates/flatpak-manifest.stub.json | 4 ++-- templates/quickview.desktop | 2 +- 12 files changed, 30 insertions(+), 24 deletions(-) rename assets/desktop/{com.example.QuickView.desktop => io.github.Green2Grey2.QuickView.desktop} (90%) rename assets/icons/hicolor/scalable/apps/{com.example.QuickView.svg => io.github.Green2Grey2.QuickView.svg} (100%) rename assets/metainfo/{com.example.QuickView.metainfo.xml => io.github.Green2Grey2.QuickView.metainfo.xml} (88%) rename packaging/flatpak/{com.example.QuickView.json => io.github.Green2Grey2.QuickView.json} (69%) diff --git a/README.md b/README.md index 57c8231..4b4e289 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- QuickView icon + QuickView icon

QuickView

diff --git a/adrs/ADR-0009-Caching.md b/adrs/ADR-0009-Caching.md index ca47e04..bc5de50 100644 --- a/adrs/ADR-0009-Caching.md +++ b/adrs/ADR-0009-Caching.md @@ -50,8 +50,8 @@ The implementation went **straight to on-disk**, revising the decision above: length still misses, and the key is snapshotted *before* tesseract runs so a file edited mid-OCR stores its stale result under the old key (which the edited file then correctly misses) rather than the new one. The path is - derived from the lowercased app name, so the pending app-ID rename does not - move it on Linux. + derived from the lowercased app name, so the app-ID rename (done: + io.github.Green2Grey2.QuickView) did not move it on Linux. - Tesseract is currently invoked with no psm/oem flags, so `lang` is the only setting and it is in the key. **When OCR settings become configurable (Phase 7 hardening: psm/oem, tessdata_fast/best), they must join the key.** diff --git a/assets/desktop/com.example.QuickView.desktop b/assets/desktop/io.github.Green2Grey2.QuickView.desktop similarity index 90% rename from assets/desktop/com.example.QuickView.desktop rename to assets/desktop/io.github.Green2Grey2.QuickView.desktop index cb769e7..1ed77a0 100644 --- a/assets/desktop/com.example.QuickView.desktop +++ b/assets/desktop/io.github.Green2Grey2.QuickView.desktop @@ -3,7 +3,7 @@ Type=Application Name=QuickView Comment=Wayland image viewer with OCR text selection Exec=quickview %f -Icon=com.example.QuickView +Icon=io.github.Green2Grey2.QuickView Terminal=false Categories=Graphics;Viewer; MimeType=image/png;image/jpeg;image/webp;image/gif;image/tiff;image/bmp;image/svg+xml; diff --git a/assets/icons/hicolor/scalable/apps/com.example.QuickView.svg b/assets/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg similarity index 100% rename from assets/icons/hicolor/scalable/apps/com.example.QuickView.svg rename to assets/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg diff --git a/assets/metainfo/com.example.QuickView.metainfo.xml b/assets/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml similarity index 88% rename from assets/metainfo/com.example.QuickView.metainfo.xml rename to assets/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml index a2a4db8..e9b2419 100644 --- a/assets/metainfo/com.example.QuickView.metainfo.xml +++ b/assets/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml @@ -1,6 +1,6 @@ - com.example.QuickView + io.github.Green2Grey2.QuickView QuickView Wayland image viewer with OCR text selection CC0-1.0 @@ -16,7 +16,7 @@ https://github.com/Green2Grey2/QuickView https://github.com/Green2Grey2/QuickView/issues - com.example.QuickView.desktop + io.github.Green2Grey2.QuickView.desktop quickview diff --git a/crates/quickview-core/src/cache.rs b/crates/quickview-core/src/cache.rs index 611f857..d3ac420 100644 --- a/crates/quickview-core/src/cache.rs +++ b/crates/quickview-core/src/cache.rs @@ -16,8 +16,11 @@ use crate::ocr::models::OcrResult; /// /// On Linux this is typically: `~/.cache/quickview/`. pub fn cache_dir() -> Option { - // qualifier, org, app - let proj = ProjectDirs::from("com", "example", "QuickView")?; + // qualifier, org, app — must stay in sync with the application ID + // io.github.Green2Grey2.QuickView. On Linux the path only uses the + // lowercased app name (~/.cache/quickview/), so renaming the ID did not + // move the cache and pre-rename entries remain valid. + let proj = ProjectDirs::from("io.github", "Green2Grey2", "QuickView")?; Some(proj.cache_dir().to_path_buf()) } diff --git a/crates/quickview-ui/src/lib.rs b/crates/quickview-ui/src/lib.rs index 00cd61b..3ea0df1 100644 --- a/crates/quickview-ui/src/lib.rs +++ b/crates/quickview-ui/src/lib.rs @@ -54,7 +54,7 @@ struct PreviewHandle { /// [`ipc::to_argv`] ever reaches GLib, so GLib never sees the real CLI flags. pub fn run(opts: LaunchOptions) -> Result { let app = adw::Application::builder() - .application_id("com.example.QuickView") + .application_id("io.github.Green2Grey2.QuickView") .flags(gio::ApplicationFlags::HANDLES_COMMAND_LINE) .build(); diff --git a/docs/PHASED_PLAN.md b/docs/PHASED_PLAN.md index 54309b4..67ec93e 100644 --- a/docs/PHASED_PLAN.md +++ b/docs/PHASED_PLAN.md @@ -125,8 +125,11 @@ If priorities change, you can reshuffle phases, but try to keep the “render fi - optional action for quick preview mode ✅ (`QuickPreview` desktop action) - Compositor keybind recipes (niri, Hyprland, Sway) documented (`templates/keybind-examples.md` exists but is generic — add per-compositor snippets) -- Rename placeholder app ID `com.example.QuickView` before wider distribution - (touches app ID in `quickview-ui`, `.desktop`, metainfo, icon filename, Flatpak manifest, PKGBUILD) +- Rename placeholder app ID to `io.github.Green2Grey2.QuickView` ✅ + (app ID in `quickview-ui`, `.desktop`, metainfo, icon filename, Flatpak + manifest, PKGBUILD, and the `ProjectDirs` qualifier in `cache.rs`; Linux + cache/config paths derive from the lowercased app name, so + `~/.cache/quickview/` did not move and existing OCR cache entries stay valid) - Quick Preview dismissal completeness (FR-002): - click outside closes ✅ — layer-shell path: surface anchored to all edges, transparent backdrop (`gtk::Overlay` sibling of the centered panel) closes diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 70489ad..7d39c86 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -44,14 +44,14 @@ package() { install -Dm755 "target/release/quickview" "$pkgdir/usr/bin/quickview" - install -Dm644 "assets/desktop/com.example.QuickView.desktop" \ - "$pkgdir/usr/share/applications/com.example.QuickView.desktop" + install -Dm644 "assets/desktop/io.github.Green2Grey2.QuickView.desktop" \ + "$pkgdir/usr/share/applications/io.github.Green2Grey2.QuickView.desktop" - install -Dm644 "assets/metainfo/com.example.QuickView.metainfo.xml" \ - "$pkgdir/usr/share/metainfo/com.example.QuickView.metainfo.xml" + install -Dm644 "assets/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml" \ + "$pkgdir/usr/share/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml" - install -Dm644 "assets/icons/hicolor/scalable/apps/com.example.QuickView.svg" \ - "$pkgdir/usr/share/icons/hicolor/scalable/apps/com.example.QuickView.svg" + install -Dm644 "assets/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg" \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg" install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/packaging/flatpak/com.example.QuickView.json b/packaging/flatpak/io.github.Green2Grey2.QuickView.json similarity index 69% rename from packaging/flatpak/com.example.QuickView.json rename to packaging/flatpak/io.github.Green2Grey2.QuickView.json index d7c06e6..911d6b6 100644 --- a/packaging/flatpak/com.example.QuickView.json +++ b/packaging/flatpak/io.github.Green2Grey2.QuickView.json @@ -1,5 +1,5 @@ { - "app-id": "com.example.QuickView", + "app-id": "io.github.Green2Grey2.QuickView", "runtime": "org.gnome.Platform", "runtime-version": "49", "sdk": "org.gnome.Sdk", @@ -36,9 +36,9 @@ "build-commands": [ "cargo build --release --locked", "install -Dm755 target/release/quickview /app/bin/quickview", - "install -Dm644 assets/desktop/com.example.QuickView.desktop /app/share/applications/com.example.QuickView.desktop", - "install -Dm644 assets/metainfo/com.example.QuickView.metainfo.xml /app/share/metainfo/com.example.QuickView.metainfo.xml", - "install -Dm644 assets/icons/hicolor/scalable/apps/com.example.QuickView.svg /app/share/icons/hicolor/scalable/apps/com.example.QuickView.svg", + "install -Dm644 assets/desktop/io.github.Green2Grey2.QuickView.desktop /app/share/applications/io.github.Green2Grey2.QuickView.desktop", + "install -Dm644 assets/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml /app/share/metainfo/io.github.Green2Grey2.QuickView.metainfo.xml", + "install -Dm644 assets/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg /app/share/icons/hicolor/scalable/apps/io.github.Green2Grey2.QuickView.svg", "install -Dm644 LICENSE /app/share/licenses/quickview/LICENSE" ], "sources": [ diff --git a/templates/flatpak-manifest.stub.json b/templates/flatpak-manifest.stub.json index 328f699..03012a3 100644 --- a/templates/flatpak-manifest.stub.json +++ b/templates/flatpak-manifest.stub.json @@ -1,6 +1,6 @@ { - "_note": "This is a starter template. The canonical manifest is packaging/flatpak/com.example.QuickView.json.", - "app-id": "com.example.QuickView", + "_note": "This is a starter template. The canonical manifest is packaging/flatpak/io.github.Green2Grey2.QuickView.json.", + "app-id": "io.github.Green2Grey2.QuickView", "runtime": "org.gnome.Platform", "runtime-version": "46", "sdk": "org.gnome.Sdk", diff --git a/templates/quickview.desktop b/templates/quickview.desktop index 89a612a..2e5ac45 100644 --- a/templates/quickview.desktop +++ b/templates/quickview.desktop @@ -3,7 +3,7 @@ Type=Application Name=QuickView Comment=Wayland image viewer with OCR text selection Exec=quickview %f -Icon=com.example.QuickView +Icon=io.github.Green2Grey2.QuickView Terminal=false Categories=Graphics;Viewer; MimeType=image/png;image/jpeg;image/webp;image/gif;image/tiff;image/bmp;image/svg+xml;