fix: QA hardening across desktop connect, CLI, setup, and PWA update flow (#52)
CI / Backend Tests (push) Canceled after 0s
CI / Frontend Tests (push) Canceled after 0s
CI / Build All Services (push) Canceled after 0s
CI / Docker Build (auth) (push) Canceled after 0s
CI / Docker Build (backend) (push) Canceled after 0s
CI / Docker Build (frontend) (push) Canceled after 0s
CI / Publish edge images (auth) (push) Canceled after 0s
CI / Publish edge images (backend) (push) Canceled after 0s
CI / Publish edge images (frontend) (push) Canceled after 0s
CI / Migration Up/Down (push) Canceled after 0s
CI / Compose E2E Smoke (push) Canceled after 0s
CI / Lint (push) Canceled after 0s

- desktop: probe-then-persist server URL — scheme-less input tries https
  then http; a failed probe no longer saves a dead URL that would trap
  the next launch in a redirect to a broken address
- frontend: close the create-collection modal on successful submit
  (backdrop stayed mounted and intercepted navigation)
- frontend: reload once on service-worker controllerchange so returning
  users don't run a stale cached shell after a deploy
- frontend: gate dashboard empty states on resource loading to stop the
  "No project selected" / "Create your workspace" flash
- cli: resolve scheduled-job refs by name or id for jobs:run, jobs:runs,
  and jobs:rm, matching bucket/org resolution
- cli: correct stale pk_live_/pk_test_ help text to the real prm_ format;
  align README command spellings and demo seed prefixes
- setup: rewrite all public URL vars (auth, vite, backend) and cookie
  domain for the entered host — https for domains, http for IPs — with
  anchored full-line substitutions so stale ports/paths can't survive
- docs: VITE_* vars never reach the frontend image build; the app
  resolves API/auth URLs same-origin at runtime, so host changes need no
  rebuild — noted HTTPS requirement for PWA/secure-context features

Generated with [Devin](https://devin.ai)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomáš DvořákandDevin authored and GitHub committed 2026-10-03 18:52:53 +02:00
1 parent 56c63d43cd
commit d44bbcceda
12 files changed
+138 -33

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ project interactively.
## Commands
`orgs`, `projects`, `buckets`, `objects` (list/upload/download/rm), `keys`,
`jobs`, `events:send`, `audit list --follow`. Every command accepts `--json`.
`jobs`, `events:send`, `audit:list --follow`. Every command accepts `--json`.
```sh
primora events:send custom.deploy.done --data '{"sha":"abc123"}'
@@ -31,7 +31,7 @@ primora events:send custom.deploy.done --data '{"sha":"abc123"}'
webhooks, and `event_pattern` functions all fire.
```sh
primora documents list --collection users \
primora documents:list --collection users \
--filter "status.eq.active,age.gt.18" --order "age.desc"
```
+1 -1
View File
@@ -51,7 +51,7 @@ cli
.option("--url <url>", "Primora base URL (default http://localhost)")
.option("--email <email>", "Account email")
.option("--password <password>", "Account password")
.option("--api-key <key>", "Store a pk_live_/pk_test_ API key instead of a session")
.option("--api-key <key>", "Store a prm_ API key instead of a session")
.option("--json", "Machine-readable output")
.action(cmdLogin);
+7 -4
View File
@@ -2,7 +2,7 @@ import type { ScheduledJob, ScheduledJobRun } from "@primora/api-client";
import { AutomationService } from "@primora/api-client";
import { loadConfig } from "../config.js";
import { configureClient, requireAuth, requireProject } from "../http.js";
import { configureClient, requireAuth, requireProject, resolveJobId } from "../http.js";
import { formatDate, isJson, printJson, printTable, success } from "../out.js";
interface JobOptions {
@@ -88,12 +88,13 @@ export async function cmdJobsCreate(
}
}
export async function cmdJobsRemove(jobId: string, options: JobOptions & { yes?: boolean }): Promise<void> {
export async function cmdJobsRemove(jobRef: string, options: JobOptions & { yes?: boolean }): Promise<void> {
const cfg = loadConfig();
requireAuth(cfg);
configureClient(cfg);
const projectId = requireProject(cfg, options.project);
const jobId = await resolveJobId(projectId, jobRef);
await AutomationService.deleteScheduledJob({ projectId, jobId });
if (isJson(options)) {
printJson({ deleted: jobId });
@@ -102,12 +103,13 @@ export async function cmdJobsRemove(jobId: string, options: JobOptions & { yes?:
}
}
export async function cmdJobsRun(jobId: string, options: JobOptions): Promise<void> {
export async function cmdJobsRun(jobRef: string, options: JobOptions): Promise<void> {
const cfg = loadConfig();
requireAuth(cfg);
configureClient(cfg);
const projectId = requireProject(cfg, options.project);
const jobId = await resolveJobId(projectId, jobRef);
const run = await AutomationService.runScheduledJob({ projectId, jobId });
if (isJson(options)) {
printJson(run);
@@ -128,7 +130,7 @@ function runRow(run: ScheduledJobRun): string[] {
}
export async function cmdJobsRuns(
jobId: string,
jobRef: string,
options: JobOptions & { limit?: string },
): Promise<void> {
const cfg = loadConfig();
@@ -136,6 +138,7 @@ export async function cmdJobsRuns(
configureClient(cfg);
const projectId = requireProject(cfg, options.project);
const jobId = await resolveJobId(projectId, jobRef);
const page = await AutomationService.listScheduledJobRuns({
projectId,
jobId,
+14 -1
View File
@@ -1,4 +1,4 @@
import { OpenAPI, StorageService } from "@primora/api-client";
import { AutomationService, OpenAPI, StorageService } from "@primora/api-client";
import type { CliConfig } from "./config.js";
@@ -110,3 +110,16 @@ export async function resolveBucketId(projectId: string, ref: string): Promise<s
}
return match.id;
}
/** Resolve a scheduled job reference that may be an id or a name. */
export async function resolveJobId(projectId: string, ref: string): Promise<string> {
const { items } = await AutomationService.listScheduledJobs({ projectId });
const match = items.find((j) => j.id === ref || j.name === ref);
if (!match) {
throw new CliError(
`Job "${ref}" not found.`,
`Known jobs: ${items.map((j) => j.name).join(", ") || "(none)"}`,
);
}
return match.id;
}