diff --git a/.claude/skills/gitea/SKILL.md b/.claude/skills/gitea/SKILL.md new file mode 100644 index 0000000..4def937 --- /dev/null +++ b/.claude/skills/gitea/SKILL.md @@ -0,0 +1,77 @@ +--- +name: gitea +description: Create pull requests on Gitea using the tea CLI. Use when the user asks to "create a PR", "open a pull request", "make a PR", "submit PR", or any variation involving pull requests for this repository. +--- + +# Gitea Pull Requests + +This project uses Gitea (git.rev.iq) for hosting and the `tea` CLI for creating pull requests. + +## Prerequisites + +- The `tea` CLI is installed via devenv (pinned to 0.10.1 to avoid TTY bugs in 0.11.x) +- Login is configured via `~/.config/tea/config.yml` + +## Creating a Pull Request + +When asked to create a PR, follow these steps: + +### 1. Check current state + +```bash +git status +git log --oneline -5 +git diff master...HEAD --stat +``` + +### 2. Ensure changes are committed and pushed + +If there are uncommitted changes, commit them first. Then push: + +```bash +git push -u origin +``` + +### 3. Create the PR using tea + +```bash +tea pr create \ + -r igm/publisher-dashboard \ + --title "PR title here" \ + --description "## Summary +- Change 1 +- Change 2 + +🤖 Generated with [Claude Code](https://claude.ai/code)" \ + --head \ + --base master +``` + +**Important flags:** +- `-r igm/publisher-dashboard` - Always specify the repo explicitly (required due to SSH remote detection issues) +- `--head` - The source branch (your feature branch) +- `--base` - The target branch (usually `master`) + +### 4. Return the PR URL + +The command outputs the PR URL. Always share this with the user. + +## Example Output + +``` +# #1 Update packages to export from dist/ (open) + +@igm created 2024-01-11 **master** <- **fix-exports** + +-------- + +• No Conflicts +• Maintainers are allowed to edit + +https://git.rev.iq/igm/publisher-dashboard/pulls/1 +``` + +## Troubleshooting + +- If tea fails with TTY errors, ensure you're using tea 0.10.1 (configured in `nix/tea.nix`) +- The repo flag `-r igm/publisher-dashboard` is required because the SSH remote isn't auto-detected diff --git a/CLAUDE.md b/CLAUDE.md index cea3024..dd7db9f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,6 +7,13 @@ Before starting the dev server, check if it's already running: - The dev server runs on port 6827 (may fall back to 6828 if port is in use) - Start with `bun run --cwd apps/publisher-dashboard dev` or `devenv up` +## Pull Requests + +This repo uses Gitea (git.rev.iq) with the `tea` CLI for pull requests: +- Use the `/gitea` skill when creating PRs +- tea 0.10.1 is pinned in `nix/tea.nix` (0.11.x has TTY bugs) +- Always specify `-r igm/publisher-dashboard` flag (SSH remote auto-detection doesn't work) + ## macOS sed Syntax macOS uses BSD sed which differs from GNU sed: diff --git a/apps/publisher-dashboard/src/lib/components/account/account-nav.svelte b/apps/publisher-dashboard/src/lib/components/account/account-nav.svelte index bf64247..4cc6bfc 100644 --- a/apps/publisher-dashboard/src/lib/components/account/account-nav.svelte +++ b/apps/publisher-dashboard/src/lib/components/account/account-nav.svelte @@ -60,7 +60,7 @@ function isActive(href: string, pathname: string): boolean { {#each navItems as item (item.href)} {@const active = isActive(item.href, $page.url.pathname)} ({ $effect(() => { if (!isAuthPage && userQuery.error) { goto( - resolve(`/auth/login?redirect=${encodeURIComponent(page.url.pathname)}`), + resolve( + `/auth/login?redirect=${encodeURIComponent(page.url.pathname)}` as any, + ), ); } }); diff --git a/apps/publisher-dashboard/src/lib/components/dashboard/frequent-filters.svelte b/apps/publisher-dashboard/src/lib/components/dashboard/frequent-filters.svelte index 33600ed..477f4c1 100644 --- a/apps/publisher-dashboard/src/lib/components/dashboard/frequent-filters.svelte +++ b/apps/publisher-dashboard/src/lib/components/dashboard/frequent-filters.svelte @@ -28,7 +28,7 @@ const filters = [
{#each filters as filter (filter.label)}
diff --git a/apps/publisher-dashboard/src/lib/components/dashboard/performance-table.svelte b/apps/publisher-dashboard/src/lib/components/dashboard/performance-table.svelte index bf9276a..07d1258 100644 --- a/apps/publisher-dashboard/src/lib/components/dashboard/performance-table.svelte +++ b/apps/publisher-dashboard/src/lib/components/dashboard/performance-table.svelte @@ -40,7 +40,7 @@ function handleTabChange(tabId: string) { } else { url.searchParams.set("tab", tabId); } - goto(resolve(url.toString()), { replaceState: true, noScroll: true }); + goto(resolve(url.toString() as any), { replaceState: true, noScroll: true }); } diff --git a/apps/publisher-dashboard/src/lib/components/layout/account/account-settings-layout.svelte b/apps/publisher-dashboard/src/lib/components/layout/account/account-settings-layout.svelte index c17beb8..8d62342 100644 --- a/apps/publisher-dashboard/src/lib/components/layout/account/account-settings-layout.svelte +++ b/apps/publisher-dashboard/src/lib/components/layout/account/account-settings-layout.svelte @@ -6,6 +6,7 @@ import MonitorIcon from "@lucide/svelte/icons/monitor"; import ShieldCheckIcon from "@lucide/svelte/icons/shield-check"; import UserIcon from "@lucide/svelte/icons/user"; import { createQuery } from "@tanstack/svelte-query"; +import { resolve } from "$app/paths"; import { page } from "$app/stores"; import { api } from "$lib/api/client"; import { DashboardLayout } from "$lib/components/layout"; @@ -91,10 +92,10 @@ function isActive(href: string): boolean {