Issue/46 #47
@@ -1,39 +0,0 @@
|
||||
# AGENTS.md
|
||||
|
||||
This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
./mvnw spring-boot:run # run app (default goal) — http://localhost:8080, ~30s first start
|
||||
./mvnw compile # compile only
|
||||
./mvnw package # production build → target/*.jar
|
||||
java -jar target/*.jar # run production jar
|
||||
```
|
||||
|
||||
No test sources exist yet (`src/test` is empty) — `spring-boot-starter-test` and `browserless-test-spring` are on the classpath but unused.
|
||||
|
||||
**Java 25 toolchain required** (`pom.xml` sets `java.version=25`). If the default JDK on PATH is older (check `java -version`), point `JAVA_HOME` at a Java 25 install for the Maven build, e.g.:
|
||||
```bash
|
||||
JAVA_HOME="/path/to/jdk-25" ./mvnw compile
|
||||
```
|
||||
|
||||
Port 8080 conflicts: a prior `spring-boot:run` left running in the background is the usual cause (Vaadin dev mode keeps a second process/thread alive under a different PID than the launching Maven process — killing the Maven process alone may not free the port). Find and stop the actual listener before restarting.
|
||||
|
||||
## Architecture
|
||||
|
||||
Vaadin Flow (server-side Java UI, no hand-written HTML/JS for views) on Spring Boot 4.1, using the **Aura** theme (not Lumo — no `@Theme` annotation; Aura is wired via `@StyleSheet(Aura.STYLESHEET)` in `Application.java`).
|
||||
|
||||
**Charts are ApexCharts, not Vaadin Charts.** The bridge lives in `components/`:
|
||||
- `ApexChart` (abstract, `@Tag("apex-chart")`) — owns the JS module (`frontend/components/apex-chart.ts`, a Lit element rendering into light DOM), serializes an options `Map` to JSON via Jackson and calls `renderChart` client-side, and exposes point-click events back to the server via `@ClientCallable`.
|
||||
- `AxisChart` (abstract) — builds `series`/`xaxis.categories` options for line/bar.
|
||||
- `LineChart`, `BarChart` extend `AxisChart`; `PieChart` extends `ApexChart` directly (`series`/`labels` instead of axis-based).
|
||||
- `DialectTheme` — single source of chart styling (categorical color palette, grid/legend/stroke option fragments). Every chart's `setData(...)` starts from `DialectTheme.baseOptions(chartType)` and merges in its data. Add new chart types here, not by duplicating option maps.
|
||||
|
||||
Since `apex-chart.ts` renders into light DOM (`createRenderRoot()` returns `this`), global CSS can reach into the chart markup — but series/legend/grid colors are driven entirely by the options JSON, not CSS, because ApexCharts renders its own SVG/canvas.
|
||||
|
||||
**Views** (`views/`): `MainLayout` (`@Layout`, applies to all routes) is the `AppLayout` shell — navbar + `SideNav` drawer, with one `SideNavItem` per route. Routes: `DashboardView` (`@Route("")`) wraps each chart in a `Card` (`components/Card.java`); `FormView` (`@Route("formular")`) demonstrates form controls bound via `Binder`; `TableView` (`@Route("tabelle")`) demonstrates a `Grid` over dummy data with a live text filter (`GridListDataView.addFilter`, `TextField` in `ValueChangeMode.EAGER`). New views should reuse `Card` to wrap their content rather than adding components directly, and get a matching `SideNavItem` in `MainLayout`.
|
||||
|
||||
**Styling**: `src/main/resources/META-INF/resources/styles.css` is the one project-level stylesheet (loaded via `@StyleSheet("styles.css")` in `Application.java`). It defines `--dialect-*` design tokens (Dialect design system: primary orange `#E86C00`, cool-gray background, card radius/shadow) and aliases them onto Aura's own CSS custom properties (`--aura-accent-color-*`, `--aura-background-color-*`, `--aura-orange`, `--aura-yellow`) rather than fighting the theme. Aura tokens use OKLCH + relative-color syntax and accept plain hex overrides. When restyling, prefer extending this alias layer over hardcoding new colors in components.
|
||||
|
||||
UI copy/data (chart labels, notifications) is in German.
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
source .env
|
||||
|
||||
REPO_DIR="$HOME/codebase/chart-app" # Haupt-Klon
|
||||
BASE_BRANCH="main"
|
||||
TEST_CMD="./mvnw test" # z.B. ./gradlew test
|
||||
MAX_ISSUES=5 # pro Durchlauf, damit du nicht davonläufst
|
||||
POLL_INTERVAL=120 # Sekunden zwischen Polls (0 = einmal laufen)
|
||||
|
||||
cd "$REPO_DIR"
|
||||
|
||||
process_next() {
|
||||
git -C "$REPO_DIR" fetch origin "$BASE_BRANCH" --quiet
|
||||
git -C "$REPO_DIR" checkout "$BASE_BRANCH" --quiet
|
||||
git -C "$REPO_DIR" pull --quiet
|
||||
|
||||
# 1) Nächstes Issue holen (Sub-Agent, minimaler Output)
|
||||
local out
|
||||
out=$(claude -p "Nutze den Sub-Agent 'next-issue'. Gib NUR dessen Rueckgabezeile aus (ISSUE=<nr> oder ISSUE=NONE), keinen weiteren Text." \
|
||||
--allowedTools "Agent,mcp__gitea__list_issues,mcp__gitea__issue_read" \
|
||||
--output-format text)
|
||||
local nr
|
||||
nr=$(echo "$out" | grep -oE 'ISSUE=[0-9NONE]+' | cut -d= -f2)
|
||||
|
||||
if [[ "$nr" == "NONE" || -z "$nr" ]]; then
|
||||
echo "Keine offenen ai-ready Issues."
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ">>> Bearbeite Issue #$nr"
|
||||
local wt="../wt-issue-$nr"
|
||||
local branch="ai/issue-$nr"
|
||||
|
||||
# 2) Isolierter Worktree + Branch
|
||||
git worktree add -b "$branch" "$wt" "$BASE_BRANCH" --quiet
|
||||
|
||||
# 3) Worker im Worktree ausführen (autonom)
|
||||
(
|
||||
cd "$wt"
|
||||
claude -p "/fix-issue $nr" \
|
||||
--allowedTools "Bash($TEST_CMD),Bash(git *),Edit,Read,Write,Grep,Glob,mcp__gitea__issue_read,mcp__gitea__issue_write,mcp__gitea__label_read,mcp__gitea__pull_request_write" \
|
||||
--output-format text
|
||||
) || echo "!!! Worker für #$nr mit Fehler beendet"
|
||||
|
||||
# 4) Aufräumen
|
||||
git worktree remove "$wt" --force || true
|
||||
return 0
|
||||
}
|
||||
|
||||
# --- Hauptschleife ---
|
||||
while true; do
|
||||
count=0
|
||||
while (( count < MAX_ISSUES )); do
|
||||
if process_next; then ((count++)); else break; fi
|
||||
done
|
||||
echo "Durchlauf fertig ($count Issues)."
|
||||
(( POLL_INTERVAL == 0 )) && break
|
||||
sleep "$POLL_INTERVAL"
|
||||
done
|
||||
Reference in New Issue
Block a user