Skip to content

Add Quick Note PWA app shortcut#22

Merged
aidmax merged 1 commit intomainfrom
claude/add-pwa-shortcuts-vZE8L
Apr 23, 2026
Merged

Add Quick Note PWA app shortcut#22
aidmax merged 1 commit intomainfrom
claude/add-pwa-shortcuts-vZE8L

Conversation

@aidmax
Copy link
Copy Markdown
Owner

@aidmax aidmax commented Apr 23, 2026

Adds a shortcuts entry to the manifest so long-pressing the installed
PWA icon on Android shows a "Quick Note" action that opens /?quick=1.

https://claude.ai/code/session_01AeDjZauHMpEX5VsNM2bRYz

Adds a shortcuts entry to the manifest so long-pressing the installed
PWA icon on Android shows a "Quick Note" action that opens /?quick=1.

https://claude.ai/code/session_01AeDjZauHMpEX5VsNM2bRYz
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR adds a shortcuts entry to the PWA manifest so that long-pressing the installed app icon on Android surfaces a "Quick Note" action. It also cleanly extracts basePath into a module-level constant, eliminating the duplicate process.env.VITE_BASE_PATH ?? '/' expression. The client-side ?quick=1 handler already exists in home.tsx, so the feature is complete end-to-end.

Confidence Score: 5/5

Safe to merge — minimal, focused config change with no runtime logic impact.

The only finding is a P2 edge-case where a mis-configured (trailing-slash-free) VITE_BASE_PATH could produce a slightly malformed shortcut URL; the default deployment path / is unaffected. No logic, data, or security concerns.

No files require special attention.

Important Files Changed

Filename Overview
vite.config.ts Adds a PWA shortcuts entry for "Quick Note" (opens /?quick=1) and extracts basePath to a shared constant; both the app-side handler in home.tsx and the Vite base value are already consistent with this change.

Sequence Diagram

sequenceDiagram
    participant User as Android User
    participant OS as Android OS
    participant Manifest as PWA Manifest
    participant App as PedalNotes SPA

    User->>OS: Long-press app icon
    OS->>Manifest: Read shortcuts[]
    Manifest-->>OS: "Quick Note" → /?quick=1
    User->>OS: Tap "Quick Note"
    OS->>App: Open /?quick=1
    App->>App: useMemo → isQuickMode = true
    App-->>User: Render quick-note UI
Loading

Reviews (1): Last reviewed commit: "Add Quick Note PWA app shortcut" | Re-trigger Greptile

Comment thread vite.config.ts
name: "Quick Note",
short_name: "Quick Note",
description: "Log a quick workout note with RPE and feel",
url: `${basePath}?quick=1`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 URL may be malformed when VITE_BASE_PATH lacks a trailing slash

If VITE_BASE_PATH is set to a sub-path without a trailing slash (e.g. /pedalnotes), the template literal produces /pedalnotes?quick=1 — the query string is appended directly to the base path rather than to the root index (/pedalnotes/?quick=1). Vite expects base to end with /, but it is worth making this construction resilient so the shortcut URL always targets the app's index page.

Suggested change
url: `${basePath}?quick=1`,
url: `${basePath.replace(/\/?$/, '/')}?quick=1`,

@aidmax aidmax merged commit d842e0f into main Apr 23, 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.

2 participants