Git Status Spec
Command: /git-status [repo_path] [--commits N]
Purpose
Generate a git status dashboard displayed via an iframe artifact pointing to a hosted Astro page. The data is passed in the URL hash — no private data touches the server.
Usage
/git-status→ defaults to/workspace/erik/uvilo-os, 0 recent commits/git-status /workspace/erik/other-repo→ any git checkout on the volume/git-status --commits 5or/git-status -c 5→ show 5 recent commits/git-status --commits 0or/git-status -c 0→ skip recent commits section entirely (default)
Architecture
Security model:
- The hosted page is an empty shell — zero data on the server
- All private data (commits, branches, files) lives only in the URL fragment (#hash)
- The hash is never sent to the server in HTTP requests
- Vercel Deployment Protection is bypassed via automation token (stored in
.secrets) Content-Security-Policy: frame-ancestors *is set for/artifacts/*routes
Data Gathering
Run these calls in parallel where possible:
git_status→ branch name, list of uncommitted files (staged + unstaged + untracked)git_log(max_count=N, default 0; if 0 still fetch max_count=1 for HEAD commit) → recent commit historygit_branch(branch_type=“local”) → list of local branchesgit_fetch→ ensure remote refs are up to date
Then sequentially:
git_diff(target=origin/<branch>..HEAD) → committed but unpushed changes- If this fails (no remote tracking branch), note “no remote tracking branch”
Deriving URLs
GitHub:
- Branch:
https://github.com/ErikDakoda/uvilo-os/tree/<branch> - For other repos: parse the remote URL or ask the user
GitHub Diff:
- If branch !=
dev:https://github.com/ErikDakoda/uvilo-os/compare/dev...<branch> - If branch ==
dev:https://github.com/ErikDakoda/uvilo-os/commit/<HEAD_sha> - Store as
links.githubDiff
Vercel Preview (uvilo-os only):
- Call
getDeploymentswithteamId="uvilo",limit=5 - Find the most recent deployment whose
meta.githubCommitRefmatches the current branch - Use the branch alias from deployment meta for the preview URL
- Include the Vercel Inspector link from
inspectorUrl - Skip this section entirely for non-uvilo-os repos
Vercel Bypass Token
Read from /workspace/librechat/.secrets:
Rendering
Step 1: Build STATUS_DATA
Step 2: Output artifact
Output a text/html artifact with identifier git-status-dashboard:
Replace STATUS_DATA_JSON_HERE with the actual JSON object (not stringified — raw JS object literal).
Replace BYPASS_TOKEN_HERE with the token from .secrets.
Important: The artifact type must be text/html, not application/vnd.react.
The identifier must always be git-status-dashboard so it updates in place.
Dark Mode
The hosted Astro page uses CSS custom properties with a [data-theme="dark"] selector.
Theme detection is via prefers-color-scheme media query with a manual three-way toggle
(Light / System / Dark). Since this is our own page (not a CodeSandbox artifact), CSS
variables work properly — no inline style workarounds needed.
Hosted Page
Location: .internal/src/pages/artifacts/git-status.astro
Route: https://os.uvilo.com/artifacts/git-status
The page is a standalone Astro page (no Starlight layout). It uses:
- Vanilla JavaScript (no React/framework dependency)
- Inline SVG icons (Lucide paths)
- CSS custom properties for theming
is:inlinescript to avoid module bundling (onclick handlers need global scope)
Deployment Notes
- The page must be merged to
devbranch and deployed toos.uvilo.combefore the iframe approach works from artifacts - Vercel header override in
.internal/vercel.jsonsetsContent-Security-Policy: frame-ancestors *for/artifacts/*routes - The Vercel bypass token in the URL allows the iframe to load through Deployment Protection