diff --git a/AGENTS.md b/AGENTS.md index b669126..40e8009 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,14 +36,19 @@ Use `.env.local` for local secrets. Keep `.env.local` and any real token-bearing - `vite.config.ts` emits `dist/manifest.json` during production builds. - `dist/` is the deployable output directory. Deployment or Chrome load-unpacked flows should point directly at `dist/`. - `dist/` is generated output and should not be edited directly. -- Static extension assets live in `public/`; the current favicon source is `public/favicon.svg`. +- Static extension assets live in `public/`; extension icon sources live under `public/icons/`. - `scripts/generate-local-context.mjs` generates `public/local-context.json` from `/Users/Tabitha/.openclaw/workspace_Father` before builds. - `public/local-context.json` is a committed fallback snapshot so CI builds can still produce a self-contained `dist/` if the local workspace root is unavailable. - `npm run build` runs `scripts/verify-dist.mjs` after Vite to ensure the generated output has the required extension files. - Host permissions are derived from `VITE_GITEA_BASE_URL`. Rebuild after changing the base URL. - Runtime API calls are centralized in `src/api.ts`. -- Popup state is centralized in the vanilla Zustand store at `src/store.ts`. -- The popup UI is a movable drag/drop window with icon menu sections for URLs, Gitea repos, and workspaces. Add URL and Add Issue are intentionally disabled. +- Side panel state is centralized in the vanilla Zustand store at `src/store.ts`. +- The extension opens as a Chrome side panel. It is not a draggable in-page window. +- The side panel has icon menu sections for Add URL, URLs, Gitea repos, Workspaces, and Add Issue. +- Add URL is enabled only when the active tab's base URL is not already in the URLs list. The user must pick either a workspace or a Gitea repo; the app infers the linked counterpart from local context. +- Add Issue is enabled only when the active tab's base URL is already in the URLs list and has a linked Gitea repo. The issue form must show the target repo, capture visible-tab screenshots, accept Gitea-friendly file attachments, and include `Chrome profile: Silma` in created issue bodies. +- If the Ready checkbox is checked, create the issue first, upload screenshots/files as issue assets second, and apply the `ready` label last. +- The extension requests `activeTab` so screenshots can be captured from the current Chrome tab. ## Chrome Extension Management diff --git a/README.md b/README.md index 49c7196..2b8fad7 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ Build the Chrome extension: npm run build ``` -The deployable extension output is `dist/`. Load `dist/` in Chrome as an unpacked extension, or point deployment tooling at that folder. `npm run build` runs TypeScript, Vite, and a post-build check that verifies `dist/manifest.json` and the popup entry exist. +The deployable extension output is `dist/`. Load `dist/` in Chrome as an unpacked extension, or point deployment tooling at that folder. `npm run build` runs TypeScript, Vite, and a post-build check that verifies `dist/manifest.json`, the side panel entry, and the background service worker exist. -Static assets, including the favicon, live in `public/` and are copied into `dist/` during the build. +Static assets, including the extension icon assets, live in `public/` and are copied into `dist/` during the build. -The app opens as a draggable window inside the extension popup. The top icon menu includes URLs, Gitea repos, and workspaces; Add URL and Add Issue are present but disabled for now. +The app opens in the Chrome side panel. The top icon menu includes Add URL, URLs, Gitea repos, Workspaces, and Add Issue. Add URL is enabled only for an active tab base URL that is not already in the URLs list. Add Issue is enabled when the active tab base URL is already linked to a Gitea repo; it creates an issue, uploads screenshots and files as issue assets, and can apply the `ready` label after uploads. Builds generate `public/local-context.json` from `/Users/Tabitha/.openclaw/workspace_Father`. That snapshot links known workspaces to local Gitea repos and is copied into `dist/` so the built extension is self-contained. diff --git a/docs/extension-management.md b/docs/extension-management.md index 78fe112..4eae71b 100644 --- a/docs/extension-management.md +++ b/docs/extension-management.md @@ -1,6 +1,6 @@ # Extension Management -This project builds a Chrome extension from the generated `dist/` directory. Run `npm run build` before loading or reloading the unpacked extension. +This project builds a Chrome side panel extension from the generated `dist/` directory. Run `npm run build` before loading or reloading the unpacked extension. ## Required Chrome Profile @@ -13,7 +13,7 @@ This rule applies to: - Opening Chrome for extension work. - Loading `dist/` as an unpacked extension. - Reloading the extension after a build. -- Inspecting extension popups, background/service worker behavior, or permissions. +- Inspecting extension side panel, background/service worker behavior, or permissions. - Any browser automation that depends on extension state. ## Build Output @@ -35,6 +35,14 @@ Required variables: - `VITE_GITEA_REPO_OWNER` - `VITE_GITEA_REPO_NAME` +## Issue Creation + +- Add Issue is enabled only when the active tab's base URL is already in the URLs list and that URL is linked to a Gitea repo. +- The Add Issue view must show the Gitea repo that will receive the issue. +- Screenshot capture uses Chrome's visible-tab capture API and requires the extension's `activeTab` permission. +- Created issue bodies must include `Chrome profile: Silma`. +- When Ready is checked, create the issue, upload screenshots/files as Gitea issue assets, then apply the `ready` label last. + ## Agent Checklist 1. Run `npm run build`. diff --git a/index.html b/index.html index 6221a1c..e1a73b7 100644 --- a/index.html +++ b/index.html @@ -3,22 +3,14 @@ - + Silma AI Aide -
-
-
-
-

Silma

-

AI Aide

-
- Checking -
- +
+