-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Refactor download controls for mobile #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
google-labs-jules
wants to merge
1
commit into
fix-mobile-download
Choose a base branch
from
fix/mobile-download-buttons-1
base: fix-mobile-download
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+315,317
−130,186
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Copilot Task | ||
| about: Narrowly scoped task designed for GitHub Copilot assistance | ||
| labels: [copilot] | ||
| title: "[Copilot] " | ||
| body: | ||
| - type: textarea | ||
| id: problem | ||
| attributes: | ||
| label: Problem | ||
| description: Describe the exact issue or improvement needed. Reference links or screenshots if helpful. | ||
| placeholder: The /math-brain export modal mislabels the Symbolic Weather button. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: layers | ||
| attributes: | ||
| label: Woven Map Layer | ||
| description: Identify which layer(s) this touches (Frontend, API Function, Netlify Build, Poetic Brain, Docs, etc.). | ||
| placeholder: Frontend component (DownloadControls) | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: files | ||
| attributes: | ||
| label: Files Involved | ||
| description: List the key files or directories Copilot should inspect or modify. | ||
| placeholder: app/math-brain/components/DownloadControls.tsx | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: expected | ||
| attributes: | ||
| label: Expected Behavior | ||
| description: Describe the desired outcome after the change. | ||
| placeholder: Button text and download filename align with the Symbolic Weather export. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: acceptance | ||
| attributes: | ||
| label: Acceptance Criteria | ||
| description: Bullet list of verifications (tests, screenshots, docs) required before closing the task. | ||
| placeholder: | | ||
| - Button label reads “Symbolic Weather (Compact)” | ||
| - Downloaded file name matches design spec | ||
| - `npm run lint` passes | ||
| validations: | ||
| required: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| --- | ||
| name: DocOrganizerAgent | ||
| description: > | ||
| Scans, analyzes, and organizes all documentation files within the repository. Identifies scattered or duplicate files and flags outdated content by inspecting file timestamps, cross-referencing recent commits/releases/issues, and checking for deprecated information. Suggests restructured documentation hierarchy and generates documentation health reports. | ||
| --- | ||
|
|
||
| # DocOrganizerAgent | ||
|
|
||
| **Purpose:** | ||
| Automatically organize scattered documentation in the repository and identify outdated docs. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| - Scans all Markdown and documentation files across the repo (`.md`, `.txt`, documentation folders) | ||
| - Sorts files by category: | ||
| - Core Documentation (`README.md`, `MAINTENANCE_GUIDE.md`, `CHANGELOG.md`) | ||
| - API Documentation (`API_INTEGRATION_GUIDE.md`, `MATH_BRAIN_COMPLIANCE.md`) | ||
| - Developer Guides (in `Developers Notes/`, troubleshooting guides) | ||
| - Strategic Documentation (`README_STRATEGIC_DOCS.md`, `copilot-instructions.md`) | ||
| - Error Reports & Debugging (`Error Reports/`, debug files) | ||
| - Persona & Analysis docs (`Persona/`, `analysis/`, `coverage/`) | ||
| - Legacy & Reference files | ||
| - Detects duplicates, scattered files, and missing/untitled docs | ||
| - Flags outdated docs by checking: | ||
| - Last modified date (files older than 6 months) | ||
| - Cross-referencing recent commits, releases, and issues | ||
| - Deprecated or mismatched information (e.g., references to old tech stack) | ||
| - Broken internal links or outdated examples | ||
| - Proposes an improved folder and file structure | ||
| - Generates a Documentation Health Summary with: | ||
| - Current doc inventory by category | ||
| - Outdated docs requiring updates | ||
| - Duplicate or redundant files | ||
| - Missing critical documentation | ||
| - Docs to archive or consolidate | ||
| - Respects WovenWebApp conventions: | ||
| - Follows commit message standards: `[YYYY-MM-DD] TYPE: Brief description` | ||
| - Updates `CHANGELOG.md` for any doc reorganization | ||
| - Maintains Raven Calder system terminology in astrology docs | ||
| - Preserves AI collaboration notes and attribution | ||
|
|
||
| ## Customization | ||
|
|
||
| Configure these settings to adjust agent behavior: | ||
| - **Outdated threshold**: Default 6 months; adjust based on project velocity | ||
| - **File types**: Default `.md`, `.txt`; add others as needed | ||
| - **Excluded paths**: Ignore `node_modules/`, `.next/`, build artifacts | ||
| - **Target doc structure**: Define preferred folder hierarchy | ||
|
|
||
| ## How to Use | ||
|
|
||
| **From Copilot CLI:** | ||
| ```bash | ||
| gh copilot agents run doc-organizer | ||
| ``` | ||
|
|
||
| **Via GitHub Actions workflow:** | ||
| - Trigger manually or on schedule (e.g., monthly) | ||
| - Review output in PR comments or workflow summary | ||
| - Agent creates feature branch with proposed changes | ||
|
|
||
| **Output Format:** | ||
| Agent generates: | ||
| 1. **Documentation Health Report** (Markdown summary) | ||
| 2. **Proposed Restructuring Plan** (file moves/renames) | ||
| 3. **Outdated Docs List** (with reasons and suggested actions) | ||
| 4. **Updated CHANGELOG.md** entry | ||
|
|
||
| ## Integration with WovenWebApp Standards | ||
|
|
||
| - Agent works on feature branches (`docs/organize-[date]`) | ||
| - All changes require human review before merging to `main` | ||
| - Follows branch protection & merge guidelines from `copilot-instructions.md` | ||
| - Updates essential documentation as needed: | ||
| - `CHANGELOG.md` – logs all doc organization changes | ||
| - `MAINTENANCE_GUIDE.md` – updates if doc structure changes | ||
| - `README.md` – updates links if files move | ||
|
|
||
| ## Example Workflow | ||
|
|
||
| 1. Agent scans entire repo for documentation files | ||
| 2. Categorizes files by type and purpose | ||
| 3. Identifies: | ||
| - 3 duplicate README files in different folders | ||
| - 8 files not modified in >6 months | ||
| - 2 docs referencing deprecated `index.html` instead of Next.js App Router | ||
| - 5 orphaned debug files in root directory | ||
| 4. Proposes: | ||
| - Consolidate duplicate READMEs | ||
| - Move debug files to `Error Reports/` | ||
| - Archive outdated migration docs to `docs/archive/` | ||
| - Update API docs to reference current tech stack | ||
| 5. Creates feature branch with: | ||
| - File reorganization commits | ||
| - Updated internal links | ||
| - CHANGELOG entry | ||
| - Documentation Health Report | ||
| 6. Human reviewer (Jules/DHCross) approves and merges | ||
|
|
||
| ## Compliance Checklist | ||
|
|
||
| Before running agent: | ||
| - [ ] Review `MAINTENANCE_GUIDE.md` for current file organization | ||
| - [ ] Check `CHANGELOG.md` for recent doc changes | ||
| - [ ] Verify no active doc PRs that would conflict | ||
| - [ ] Confirm `main` branch is up to date | ||
|
|
||
| After agent run: | ||
| - [ ] Review Documentation Health Report | ||
| - [ ] Validate proposed file moves don't break links | ||
| - [ ] Test that all internal documentation links still work | ||
| - [ ] Verify CHANGELOG update follows standards | ||
| - [ ] Assign human reviewer for final approval | ||
|
|
||
| --- | ||
|
|
||
| **Note:** This agent respects the WovenWebApp philosophy: "Map, not mandate." It proposes improvements but requires human judgment for final decisions. All changes go through branch protection and require Jules or repo owner review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # ASTROLOGY_AGENT Profile | ||
|
|
||
| ## Scope | ||
| Specialized Copilot agent for astrological math and symbolic weather logic inside WovenWebApp. | ||
|
|
||
| ## Responsibilities | ||
| - Maintain Netlify functions that calculate chart geometry and symbolic weather (`netlify/functions/astrology-mathbrain.js`). | ||
| - Verify SRP hook generation and Balance Meter math in `src/` (`src/math_brain/`, `src/seismograph.js`, `lib/relocation-houses.js`). | ||
| - Keep FIELD → MAP → VOICE architecture intact when manipulating data contracts. | ||
|
|
||
| ## Key References | ||
| - `MATH_BRAIN_COMPLIANCE.md` | ||
| - `MAP_FIELD_IMPLEMENTATION_COMPLETE.md` | ||
| - `RAVEN_PROTOCOL_IMPLEMENTATION_COMPLETE.md` | ||
| - `SINGLE_SOURCE_OF_TRUTH_IMPLEMENTATION.md` | ||
|
|
||
| ## Conventions | ||
| - Never hardcode personal names; use payload data or anonymized placeholders. | ||
| - All outputs must remain falsifiable; include provenance when practical. | ||
| - Update or add tests under `__tests__/` or `tests/functions/` when math logic changes. | ||
|
|
||
| ## Required Checks | ||
| - `npm run test` | ||
| - `netlify dev` smoke test for affected endpoints | ||
| - Documentation updates for any schema changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Frontend Instructions | ||
|
|
||
| These rules govern React UI code under the Next.js App Router (`app/`, `components/`, `hooks/`). Copilot must follow them when editing or generating frontend files. | ||
|
|
||
| ## File & Naming Conventions | ||
| - Components belong in `components/` or the closest feature directory under `app/`. | ||
| - Use **PascalCase** filenames (e.g. `MirrorSummaryCard.tsx`). | ||
| - Export React **function components** only. Prefer explicit prop interfaces. | ||
| - Co-locate custom hooks in `hooks/` with `useSomething.ts` filenames when they are shared across components. | ||
|
|
||
| ## Styling & Layout | ||
| - Tailwind CSS is the source of truth. Use utility classes instead of inline `style` objects. | ||
| - Shared design tokens live in `tailwind.config.js`; extend that file instead of hardcoding colors. | ||
| - Respect the dark theme. Reuse palette families already in use (`slate`, `indigo`, `emerald`). | ||
|
|
||
| ## Data Flow & State Management | ||
| - Fetch data via helpers in `lib/` or Next.js route handlers; never call Netlify endpoints directly from components. | ||
| - Keep React hook dependency arrays accurate. Derive memoized values with `useMemo`/`useCallback` where needed. | ||
| - Every async action must surface loading and error UI states. Follow the toast pattern used in `components/ChatClient.tsx`. | ||
|
|
||
| ## Accessibility & UX | ||
| - Ensure interactive elements have accessible labels and keyboard focus states. | ||
| - Copy must reflect Raven Calder tone: conversational, agency-first, zero determinism. | ||
| - Keep animations subtle (100–200 ms transitions). Avoid motion-heavy effects. | ||
|
|
||
| ## Testing & Verification | ||
| - Update or add Jest tests in `__tests__/` for logical changes; use Playwright specs under `e2e/` for UI flows. | ||
| - Run `npm run lint` and `npm run test` before submitting changes. | ||
| - When touching shared layout/theme files, validate via `netlify dev` to confirm no regressions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Serverless Functions Instructions | ||
|
|
||
| These rules apply to Netlify functions stored in `netlify/functions/` and any supporting modules under `lib/`. | ||
|
|
||
| ## Structure & Naming | ||
| - Each function file must export `export const handler = async (event, context) => { ... }`. | ||
| - Keep filenames kebab-case (e.g. `astrology-mathbrain.js`). | ||
| - Shared helpers belong in `lib/` and are imported into the function file. | ||
|
|
||
| ## Input Validation & Error Handling | ||
| - Validate all query/body params. Return `400` with a descriptive error when required params are missing. | ||
| - Wrap external API calls in try/catch. Log errors via `console.error` with contextual metadata. | ||
| - Return JSON-encoded responses: `{ statusCode, headers, body: JSON.stringify(payload) }`. | ||
| - Never leak secrets or raw stack traces in responses. | ||
|
|
||
| ## Data & Domain Rules | ||
| - Preserve Raven Calder FIELD → MAP → VOICE flow: raw geometry first, then derived metrics, then narrative. | ||
| - When modifying seismograph or aspect logic, update corresponding docs (`MATH_BRAIN_COMPLIANCE.md`, etc.). | ||
| - Guard privacy: never hardcode personal names; use request payload values or anonymized placeholders. | ||
|
|
||
| ## Testing & Verification | ||
| - Add/update integration tests under `tests/functions/` or Playwright flows that exercise the function. | ||
| - Run `npm run test` (Jest/Vitest) and `netlify dev` to confirm the function works in the local Netlify runtime. | ||
| - If schema changes, update consumers (frontend hooks, Poetic Brain) and document the change. | ||
|
|
||
| ## Deployment Checks | ||
| - Ensure environment variables are accessed via `process.env.*` and documented in `.env.example`. | ||
| - Coordinate with CI (copilot-setup-steps) so builds install required deps before invoking the function. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: DocOrganizer Agent - Monthly Run | ||
|
|
||
| on: | ||
| # Run on the 1st of every month at 9:00 AM UTC | ||
| schedule: | ||
| - cron: '0 9 1 * *' | ||
|
|
||
| # Allow manual triggering from GitHub Actions UI | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| run-doc-organizer: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup GitHub CLI | ||
| run: | | ||
| type -p curl >/dev/null || sudo apt install curl -y | ||
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | ||
| sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg | ||
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null | ||
| sudo apt update | ||
| sudo apt install gh -y | ||
|
|
||
| - name: Run DocOrganizer Agent | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh copilot agents run doc-organizer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI workflow starts a Netlify dev server before tests but doesn't specify which project directory or configuration file to use. If the repository structure changes or if there are multiple Netlify configurations, this could fail silently. Consider adding
--cwdflag or explicitly pointing to the Netlify config file to make the workflow more robust.