Commit Graph

106 Commits

Author SHA1 Message Date
ZhenYi
84f2604106 docs(landing): align remaining landing pages with Command as Service concept
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-16 19:01:27 +08:00
ZhenYi
4c77426965 docs(landing): align all non-business pages with Command as Service concept
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-16 18:59:37 +08:00
ZhenYi
4eb93da28b docs(landing): update README and SEO defaults to Command as Service tagline
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-16 18:58:28 +08:00
ZhenYi
a4cb18580b docs(landing): rewrite tagline and features around Command as Service
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
- Badge: 'Command as Service · Human + Agent Engineering'
- Subtitle: 'Every action is a command. Every command is versioned,
  auditable, and composable.'
- Terminal demo: show service deploy, skill run, and replay commands
- Features: lead with Command as Service, rewrite all descriptions
  around the command stream paradigm
- Section header: 'Build. Review. Automate. All via Commands.'
- Highlight: 'Your CLI is also your API'
- Nav/Footer: surface Command as Service in Platform menu
2026-04-16 18:54:50 +08:00
ZhenYi
431f40063f fix(ws): allow APP_DOMAIN_URL and APP_STATIC_DOMAIN origins
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
validate_origin() only allowed localhost origins by default, causing
production WebSocket connections to be rejected. Now it reads
APP_DOMAIN_URL and APP_STATIC_DOMAIN from env and automatically
adds their http/https/ws/wss variants to the allowed origins list.

Also add APP_DOMAIN_URL to the production configmap.
2026-04-16 18:51:52 +08:00
ZhenYi
89deebced6 fix(api): add clone url
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-16 18:31:05 +08:00
ZhenYi
df87a65cbb fix(room): accept room_public JSON key for HTTP fallback
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
The frontend WebSocket client sends room_public, but the HTTP fallback
sends it as a JSON body parsed directly into RoomCreateRequest/RoomUpdateRequest
which expects public. Add #[serde(rename = "room_public")] so both
ws params and HTTP JSON body work consistently.
2026-04-16 18:27:53 +08:00
ZhenYi
8b433c9169 feat(repo): return ssh/https clone URLs from backend
Some checks are pending
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
Add ssh_clone_url and https_clone_url to ProjectRepositoryItem,
constructed from config.ssh_domain() and config.git_http_domain().
Update frontend RepoInfo interface and header.tsx to use the
server-provided URLs instead of hardcoded values.
2026-04-16 18:20:48 +08:00
ZhenYi
b1e93a7cfc fix(init): use resp.error to detect project_not_found instead of HTTP status
Some checks are pending
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
The generated client returns AxiosError as resp when throwOnError=false.
Check resp.error (set by the client to err.response?.data) for the
business-level code/error fields rather than relying on HTTP status.
2026-04-16 18:05:44 +08:00
ZhenYi
b4af88e730 chore(scripts): use git short SHA as default image tag
Some checks are pending
CI / Frontend Build (push) Blocked by required conditions
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
Replace timestamp-based and 'latest' defaults with git rev-parse --short
HEAD across build.js, deploy.js, and push.js for consistent, traceable
image tags tied to source commits.
2026-04-16 17:34:52 +08:00
ZhenYi
fa091b9d22 deploy(k8s): add CRD definitions for operator 2026-04-16 17:24:25 +08:00
ZhenYi
756af4fb73 docs: add branch protection, commit convention, and gitflow guides 2026-04-16 17:24:14 +08:00
ZhenYi
51e4531e95 docs: update README to reflect Redis pub/sub instead of NATS 2026-04-16 17:24:11 +08:00
ZhenYi
a09ff66191 refactor(room): remove NATS, use Redis pub/sub for message queue
- Remove async-nats from Cargo.toml dependencies
- Rename nats_publish_failed metric → redis_publish_failed
- Update queue lib doc comment: Redis Streams + Redis Pub/Sub
- Add Paused/Cancelled task statuses to agent_task model
- Add issue_id and retry_count fields to agent_task
- Switch tool executor Mutex from std::sync → tokio::sync (async context)
- Add timeout/rate-limited/retryable/tool-not-found error variants
2026-04-16 17:24:04 +08:00
ZhenYi
41f96af064 fix(init): use isAxiosError to correctly detect 404 on project name availability check 2026-04-16 17:22:25 +08:00
ZhenYi
f5084974b3 fix(k8s): add APP_SESSION_SECRET to ConfigMap to fix captcha errors with multi-pod
Without a shared cookie signing key, each pod generates a random key on
startup. Requests that hit different pods fail session validation, causing
CaptchaError when the captcha and login requests route to different pods.
2026-04-15 23:31:11 +08:00
ZhenYi
b6022e824d feat(k8s): enforce minimum 2 replicas for all services except email-worker 2026-04-15 23:08:25 +08:00
ZhenYi
e7cf0c544f fix(k8s): remove all health probes from gitserver 2026-04-15 23:07:17 +08:00
ZhenYi
dd4bbf3bb5 fix(k8s): add startupProbe to gitserver deployment template 2026-04-15 23:04:17 +08:00
ZhenYi
451e55596a fix(k8s): protect PVCs from deletion on helm uninstall 2026-04-15 23:00:55 +08:00
ZhenYi
2afad11cb6 fix(frontend): use workspaceInfo API to get full workspace data for sidebar 2026-04-15 22:55:01 +08:00
ZhenYi
a1ebe47564 fix(frontend): remove unused imports and fix workspace type in homepage 2026-04-15 22:45:07 +08:00
ZhenYi
c033cc3ff8 fix(k8s): add procps to worker images and fix probe commands
- Add procps to git-hook and email-worker Dockerfiles (provides pgrep)
- Change all exec probes from pgrep to kill -0 1 (more reliable, bash built-in)
- Add startupProbe to gitserver with 30 failure threshold (5min max startup time)
- Increase gitserver liveness initialDelay to 30s for slower SSH init
2026-04-15 22:13:16 +08:00
ZhenYi
afbc58d9bf feat(frontend): landing pages with Command as Service concept
- Add landing subpages: pricing, skills, solutions, network, about, docs
- Nav pop cards link to all subpages with nested routes
- Homepage: full landing content with top nav (no sidebar) for logged-in users
- Rewrite copy based on real backend: Git repos, Issues/PRs, Rooms, AI Agents
- Introduce "Command as Service" as core product concept
- Terminal demo shows realistic gitdata CLI commands
- Footer links updated to real routes
- Fix workspace redirect slug guard (undefined route)
2026-04-15 21:45:30 +08:00
ZhenYi
0ce70eca7f fix(deploy): bind app to 0.0.0.0 for K8s Service connectivity 2026-04-15 14:26:42 +08:00
ZhenYi
d307c13878 fix(deploy): route /api and /ws to app, frontend as default on gitdata.ai 2026-04-15 14:19:25 +08:00
ZhenYi
6c3f5b49f8 feat(deploy): single unified Ingress with per-host routing
Replace multiple conflicting Ingress resources with one that routes:
- gitdata.ai         → frontend (port 80)
- api.gitdata.ai     → app (port 8080)
- git.gitdata.ai     → gitserver-http (port 8022)
- static.gitdata.ai  → static (port 8081)

Disable service-level ingress configs in values.yaml (they would
conflict on the same host/path). Single TLS secret covers all hosts.
2026-04-15 14:17:03 +08:00
ZhenYi
b9a9acbc75 fix(deploy): correct ConfigMap name from -secrets to -config
All deployments referenced the wrong ConfigMap name.
ConfigMap is named gitdata-config in the cluster.
2026-04-15 14:11:40 +08:00
ZhenYi
d4c9759a7e revert: use configMapRef instead of secretRef
ConfigMap is managed externally and contains all required env vars.
Keeping envFrom + configMapRef injection pattern.
2026-04-15 14:09:48 +08:00
ZhenYi
b7b56938aa fix(deploy): use secretRef instead of configMapRef in all deployments
ConfigMap was removed from Helm chart (managed externally).
Secret contains all required env vars (APP_DATABASE_URL, APP_REDIS_URL,
SMTP credentials, SSH domain/key, etc.) and is always rendered
(helm.sh/resource-policy: keep prevents deletion on upgrade).
Also add APP_SSH_PORT and APP_SSH_SERVER_PRIVATE_KEY to secret template.
2026-04-15 14:06:40 +08:00
ZhenYi
ad2cb7255f refactor(deploy): use envFrom with configMapRef for all deployments
Replace individual configMapKeyRef env vars with envFrom + configMapRef
to inject the full ConfigMap, plus minimal env blocks for static values.
Also remove resources block from operator deployment (K8s schema validation).
2026-04-15 13:48:13 +08:00
ZhenYi
f1388a6ae2 fix: nginx resolver for dynamic upstream DNS resolution
Use variable-based proxy_pass so nginx resolves the app hostname
at request time instead of startup time (DNS may not be ready at startup).
2026-04-15 13:25:28 +08:00
ZhenYi
b37425d3c7 fix: add SMTP env vars to email-worker deployment 2026-04-15 13:24:45 +08:00
ZhenYi
603e14e53b fix: frontend built from repo root, dist/ copied into nginx image
vite.config.ts, package.json, and src/ are at the repo root.
pnpm build outputs to dist/ at the root. COPY dist/ not apps/frontend/dist/.
2026-04-15 13:17:07 +08:00
ZhenYi
65a34a627f refactor: build frontend externally, copy dist into nginx image
- frontend.Dockerfile: runtime-only, COPY apps/frontend/dist instead of building in Docker
- build.js: add frontend build step (pnpm build) before docker build
- drone.yml: remove obsolete frontend-deps/frontend-build steps
2026-04-15 13:00:34 +08:00
ZhenYi
3bc381da45 feat: add SMTP env vars to app deployment 2026-04-15 11:51:29 +08:00
ZhenYi
b3b74a2396 fix: remove trigger function from message search migration
The PL/pgSQL trigger function caused SQL parsing issues with
split_sql_statements. Keep only the table, column, and index.
2026-04-15 11:39:39 +08:00
ZhenYi
8e7f3b211e fix: use dollar-quoting for PL/pgSQL trigger function
The previous single-quote syntax with escaped quotes was split by
split_sql_statements on semicolons inside the function body.
Use $$ quoting to avoid quote escaping issues.
2026-04-15 11:31:40 +08:00
ZhenYi
b6697258ab fix(migrate): reorder migrations so workspace ALTER runs after project CREATE
m20260411_000003_add_workspace_id_to_project was running before
m20250628_000013_create_project, causing "relation project does not exist".
Move all project table CREATEs before workspace migrations.
2026-04-15 11:19:01 +08:00
ZhenYi
3a8b8c9cf8 remove all foreign key constraints from SQL migrations
Foreign keys at the database level cause issues with deployment flexibility.
Keep only indexes for query performance; enforce referential integrity at
the application level.
2026-04-15 11:03:17 +08:00
ZhenYi
2f31e7268b feat: add imagePullSecrets support to all deployment templates 2026-04-15 10:59:15 +08:00
ZhenYi
33c5501fc9 fix: remove resources from deployment templates to fix K8s schema validation 2026-04-15 10:56:22 +08:00
ZhenYi
53c63dad19 fix: simplify static deployment template, fix YAML parse error 2026-04-15 10:47:25 +08:00
ZhenYi
9112cb2dff fix: use scratch variable for port binding in static template 2026-04-15 10:42:53 +08:00
ZhenYi
9776c923c0 fix: use %v instead of %s+print for port in static template 2026-04-15 10:40:02 +08:00
ZhenYi
0ebbc6e29e fix: remove limits from resources to fix K8s schema validation
The cluster's API server rejects the limits field in Deployment containers.
Keep only requests (CPU/memory) for now.
2026-04-15 10:38:47 +08:00
ZhenYi
650243510c refactor: remove namespace and configmap from Helm chart
Namespace and ConfigMap are managed manually (not by Helm).
2026-04-15 10:30:02 +08:00
ZhenYi
fd724ca4ae chore: use timestamp as default image tag (YYYY-MM-DD-HH) 2026-04-15 10:16:13 +08:00
ZhenYi
852dec099d remove migrate service
Migrations run automatically on app startup; no separate migrate binary or
image needed.
2026-04-15 09:57:20 +08:00
ZhenYi
dfe4cb6207 refactor: local compile + docker push workflow
- build.js: cargo build first, then docker build — no more Docker-in-Docker
- .dockerignore: exclude target/ but re-include
  target/x86_64-unknown-linux-gnu/release/ so pre-built binaries
  are available in Docker build context
2026-04-15 09:53:45 +08:00