About dialog: show build commit hash with copy #148

Closed
opened 2026-05-30 17:14:24 +00:00 by steve · 0 comments
Owner

Show the build commit hash in the shared About dialog with a GitHub-style short SHA on a copy button.

Problem

Verifying which revision built a deployed or packaged app requires digging outside the product UI.

Goal

Expose the embedded build commit in About with a compact copy control that displays a 7-char short SHA and copies the full hash.

Scope

  • Shared commit resolver script with CI env support
  • Vite define injection in web and desktop-electron hosts
  • About dialog UI and smoke test updates
  • Release workflow env wiring

Non-goals

  • Electron native About panel changes
  • Live hash refresh without restarting dev/build

Acceptance Criteria

  • About dialog shows a copy button with a 7-character short SHA when a build commit is available
  • Clicking copy writes the full SHA to the clipboard
  • CI/release builds embed GITHUB_SHA / LAPIS_BUILD_COMMIT via the resolver
  • Workspace and desktop smoke tests assert the control is present

Implementation Notes

Use scripts/resolve-build-commit.mjs with env precedence: VITE_APP_COMMIT_HASH, LAPIS_BUILD_COMMIT, GITHUB_SHA, jj, git.

Suggested Files or Specs To Inspect

  • packages/workspace/src/lib/feature/app/about-app-dialog.svelte
  • packages/web/vite.config.ts
  • packages/desktop-electron/vite.config.ts
  • .forgejo/workflows/release-desktop.yml

Validation Commands

  • pnpm test:scripts
  • pnpm --filter @lapis-notes/web check:all
  • pnpm --filter @lapis-notes/desktop-electron check:all
  • pnpm test:smoke

Follow-up Tasks

Implementation Summary

About dialog shows a GitHub-style short build commit on a copy button (full SHA copied). Added resolve-build-commit.mjs with CI env support (GITHUB_SHA/LAPIS_BUILD_COMMIT), injected VITE_APP_COMMIT_HASH in web/desktop/workspace Vite configs, wired release-desktop build jobs, and updated smoke tests.

Show the build commit hash in the shared About dialog with a GitHub-style short SHA on a copy button. ## Problem Verifying which revision built a deployed or packaged app requires digging outside the product UI. ## Goal Expose the embedded build commit in About with a compact copy control that displays a 7-char short SHA and copies the full hash. ## Scope - Shared commit resolver script with CI env support - Vite define injection in web and desktop-electron hosts - About dialog UI and smoke test updates - Release workflow env wiring ## Non-goals - Electron native About panel changes - Live hash refresh without restarting dev/build ## Acceptance Criteria - About dialog shows a copy button with a 7-character short SHA when a build commit is available - Clicking copy writes the full SHA to the clipboard - CI/release builds embed `GITHUB_SHA` / `LAPIS_BUILD_COMMIT` via the resolver - Workspace and desktop smoke tests assert the control is present ## Implementation Notes Use `scripts/resolve-build-commit.mjs` with env precedence: `VITE_APP_COMMIT_HASH`, `LAPIS_BUILD_COMMIT`, `GITHUB_SHA`, jj, git. ## Suggested Files or Specs To Inspect - `packages/workspace/src/lib/feature/app/about-app-dialog.svelte` - `packages/web/vite.config.ts` - `packages/desktop-electron/vite.config.ts` - `.forgejo/workflows/release-desktop.yml` ## Validation Commands - `pnpm test:scripts` - `pnpm --filter @lapis-notes/web check:all` - `pnpm --filter @lapis-notes/desktop-electron check:all` - `pnpm test:smoke` ## Related Issues ## Follow-up Tasks ## Implementation Summary About dialog shows a GitHub-style short build commit on a copy button (full SHA copied). Added resolve-build-commit.mjs with CI env support (GITHUB_SHA/LAPIS_BUILD_COMMIT), injected VITE_APP_COMMIT_HASH in web/desktop/workspace Vite configs, wired release-desktop build jobs, and updated smoke tests. <!-- backlog:task_id=TASK-WORKSPACE-ABOUT-COMMIT source_spec=spec/src/20-packages/workspace/index.md -->
steve 2026-05-30 17:14:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#148
No description provided.