From f92d6e325cca0b7d91191b3f3b8e0e31663562af Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 17:21:17 +0000 Subject: [PATCH 1/3] Projects: a new project's gallery starts off, and a build says when its visualci.yml names a gallery that's off (case studies 7) --- app/src/domain/build_settings.rs | 18 ++++++++++--- app/src/domain/projects.rs | 7 +++-- app/src/forge/checks.rs | 2 +- app/src/http/api/builds.rs | 2 +- app/src/http/ui/builds.rs | 2 +- app/src/mcp/mod.rs | 2 +- app/tests/gallery.rs | 27 +++++++++++++++++++ .../create_project.json | 4 +-- .../get_project.json | 6 ++--- .../update_project-4.json | 4 +-- .../update_project.json | 4 +-- skills/visualci-config/SKILL.md | 2 +- 12 files changed, 61 insertions(+), 19 deletions(-) diff --git a/app/src/domain/build_settings.rs b/app/src/domain/build_settings.rs index d14fc890..fbf53406 100644 --- a/app/src/domain/build_settings.rs +++ b/app/src/domain/build_settings.rs @@ -98,15 +98,27 @@ pub fn stored_config(build: &Build) -> Result, ConfigInvalid> { } } +/// The warning for a build whose visualci.yml asks for a gallery the project has turned off (or never turned on). +pub const GALLERY_OFF: &str = "visualci.yml's gallery names screenshots to publish, but this project's gallery is off, \ + so none of them is public. Turn the gallery on in the project's settings (gallery_enabled) to publish them."; + /// The warnings to show with a build: the ones stored when it was created and processed, and, when its stored /// `visualci.yml` no longer validates and the build didn't already fail for it, that problem first. Used by every view /// of a build (the API and MCP answers, the build's page, its check), so a build compared before its file stopped -/// validating says so wherever it's read. +/// validating says so wherever it's read. A file whose `gallery` asks to publish screenshots while the project's gallery +/// is off says that too, since nothing it names is public until someone turns the gallery on. #[must_use] -pub fn warnings_of(build: &Build) -> Vec { +pub fn warnings_of(project: &Project, build: &Build) -> Vec { let mut out: Vec = serde_json::from_value(build.warnings.clone()).unwrap_or_default(); + let config = stored_config(build); + if !project.gallery_enabled + && let Ok(Some(c)) = &config + && c.gallery.as_ref().is_some_and(|g| !g.groups.is_empty()) + { + out.push(GALLERY_OFF.to_string()); + } if build.error_code.as_deref() != Some(CONFIG_INVALID) - && let Err(e) = stored_config(build) + && let Err(e) = config { out.insert( 0, diff --git a/app/src/domain/projects.rs b/app/src/domain/projects.rs index c5569292..3c28ea97 100644 --- a/app/src/domain/projects.rs +++ b/app/src/domain/projects.rs @@ -202,7 +202,8 @@ pub fn is_unique_violation(e: &laravel::Error) -> bool { text.contains("23505") || text.contains("duplicate key value violates unique constraint") } -/// Make a project in an organization, with the organization's settings for new projects. +/// Make a project in an organization, with the organization's settings for new projects and its gallery off. Every +/// way to make one (the web app, MCP, a GitHub App import) comes through here, so they share one set of defaults. /// /// # Errors /// `Ok(Err(_))` for a slug that isn't valid or is taken; `Err` on a database error. @@ -216,7 +217,8 @@ pub async fn create(organization_id: i64, slug: &str, name: &str) -> laravel::Re return Ok(Err(Refused::Taken)); } let name = name.trim(); - // It starts with the organization's defaults for new projects + // It starts with the organization's defaults for new projects, and with its gallery off: nothing is public until + // someone turns the gallery on, whatever visualci.yml's `gallery` asks for (the build's warnings say so). let org = crate::models::Organization::find_or_fail(organization_id).await?; match laravel::model::create!(Project { pid: laravel::str::uuid7(), @@ -225,6 +227,7 @@ pub async fn create(organization_id: i64, slug: &str, name: &str) -> laravel::Re name: name, threshold: org.project_threshold, comment_when_unchanged: org.project_comment_when_unchanged, + gallery_enabled: false, }) .await { diff --git a/app/src/forge/checks.rs b/app/src/forge/checks.rs index 3ea35810..e1918169 100644 --- a/app/src/forge/checks.rs +++ b/app/src/forge/checks.rs @@ -134,7 +134,7 @@ async fn own_check(build: &Build, project: &Project, org: &Organization) -> lara { summary.push_str(&format!("\n\n**Error:** {error}")); } - for warning in build_settings::warnings_of(build) { + for warning in build_settings::warnings_of(project, build) { summary.push_str(&format!("\n\n**Warning:** {warning}")); } if project.deleted_at.is_some() { diff --git a/app/src/http/api/builds.rs b/app/src/http/api/builds.rs index 508865ed..563df605 100644 --- a/app/src/http/api/builds.rs +++ b/app/src/http/api/builds.rs @@ -76,7 +76,7 @@ impl BuildResponse { stats: domain::stats(build), error: build.error.clone(), url: format!("{}/{}/{}/builds/{}", app_url(), organization.slug, project.slug, build.number), - warnings: crate::domain::build_settings::warnings_of(build), + warnings: crate::domain::build_settings::warnings_of(project, build), reviewable: domain::reviewable(build), blocked: None, } diff --git a/app/src/http/ui/builds.rs b/app/src/http/ui/builds.rs index ec262b7c..ed0d0858 100644 --- a/app/src/http/ui/builds.rs +++ b/app/src/http/ui/builds.rs @@ -192,7 +192,7 @@ pub async fn show_build(auth: Auth, Params((org, project, number)): Params summary["base_build_number"] = json!(base_number); summary["ci_mode"] = json!(BuildSettings::shown(project, &build).ci_mode()); summary["config"] = json!(build.config); - summary["warnings"] = json!(domain::build_settings::warnings_of(&build)); + summary["warnings"] = json!(domain::build_settings::warnings_of(project, &build)); summary["error"] = json!(build.error); // What changed, computed from the comparison. summary["summary"] = json!(domain::summary::summary_line(&build).await?); diff --git a/app/src/mcp/mod.rs b/app/src/mcp/mod.rs index d7015ef5..17653b90 100644 --- a/app/src/mcp/mod.rs +++ b/app/src/mcp/mod.rs @@ -1259,7 +1259,7 @@ impl VisualCi { out["config"] = json!(build.config); // What changed, computed from the comparison ("invoice: page 1 changed (2 regions); 3 added"). out["summary"] = json!(domain::summary::summary_line(&build).await.map_err(internal)?); - out["warnings"] = json!(domain::build_settings::warnings_of(&build)); + out["warnings"] = json!(domain::build_settings::warnings_of(&project, &build)); out["ci_mode"] = json!(BuildSettings::shown(&project, &build).ci_mode()); if paged { out["groups"] = json!( diff --git a/app/tests/gallery.rs b/app/tests/gallery.rs index d7d77340..4377f523 100644 --- a/app/tests/gallery.rs +++ b/app/tests/gallery.rs @@ -273,3 +273,30 @@ async fn cap_and_dropouts(app: Application) -> laravel::Result<()> { assert_eq!(app.get("/status").await.json()["gallery_purges_failed"], 1); Ok(()) } + +/// Every way to make a project goes through one create path, which starts its gallery off: a visualci.yml that names a +/// gallery publishes nothing until someone turns the gallery on, and the build's warnings say why (case studies, 7). +#[laravel::test] +async fn a_new_project_publishes_nothing_until_its_gallery_is_turned_on(app: Application) -> laravel::Result<()> { + let mut w = world().await?; + let project = app::domain::projects::create(w.org.id, "fresh", "Fresh").await?.expect("a valid, free slug"); + assert!(!project.gallery_enabled, "a new project's gallery starts off"); + let (old, new) = (w.project.id, project.id); + db::query!("UPDATE project_tokens SET project_id = {new} WHERE project_id = {old}").update().await?; + w.project = project; + + let b = w.build(&app, "A", "main", &[], &[("web/home", RED)]).await; + let base = format!("/g/{}/fresh", w.org.slug); + app.get(format!("{base}.json")).await.assert_status(404); + app.get(format!("{base}/web/home.png")).await.assert_status(404); + let project = Project::find_or_fail(new).await?; + let warnings = app::domain::build_settings::warnings_of(&project, &b); + assert_eq!(warnings, vec![app::domain::build_settings::GALLERY_OFF.to_string()]); + + // Turned on, it publishes, and the warning goes. + let change = serde_json::from_value(json!({ "gallery_enabled": true })).expect("a settings change"); + let project = app::domain::projects::change_settings(project, change).await?.expect("a valid change"); + app.get(format!("{base}/web/home.png")).await.assert_ok(); + assert!(app::domain::build_settings::warnings_of(&project, &b).is_empty()); + Ok(()) +} diff --git a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/create_project.json b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/create_project.json index df03619f..8b7e0eb1 100644 --- a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/create_project.json +++ b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/create_project.json @@ -7,7 +7,7 @@ "result": { "content": [ { - "text": "{\"project\":\"-b/docs\",\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":140,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":true,\"ignore_anti_aliasing\":false,\"ignore_rules\":[],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", + "text": "{\"project\":\"-b/docs\",\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":140,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":false,\"ignore_anti_aliasing\":false,\"ignore_rules\":[],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", "type": "text" } ], @@ -22,7 +22,7 @@ "forge": null, "forge_app_installed": false, "forge_webhook_at": null, - "gallery_enabled": true, + "gallery_enabled": false, "ignore_anti_aliasing": false, "ignore_rules": [], "name": "Docs", diff --git a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/get_project.json b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/get_project.json index 55a970ce..b2692ac6 100644 --- a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/get_project.json +++ b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/get_project.json @@ -5,14 +5,14 @@ "result": { "content": [ { - "text": "{\"gallery\":{\"enabled\":true,\"items\":[],\"manifest_url\":null},\"project\":\"-b/docs\",\"repository_seen_in_ci\":null,\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":true,\"ignore_anti_aliasing\":false,\"ignore_rules\":[{\"json_paths\":[\"$.generated_at\"],\"snapshots\":\"api/**\",\"text_patterns\":[\"\\\\d{4}-\\\\d{2}-\\\\d{2}\"]}],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true},\"tokens\":[{\"created_at\":\"\",\"id\":3,\"last_used_at\":null,\"name\":\"CircleCI\",\"prefix\":\"\"}],\"url\":\"https://app.visualci.test/-b/docs\"}", + "text": "{\"gallery\":{\"enabled\":false,\"items\":[],\"manifest_url\":null},\"project\":\"-b/docs\",\"repository_seen_in_ci\":null,\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":false,\"ignore_anti_aliasing\":false,\"ignore_rules\":[{\"json_paths\":[\"$.generated_at\"],\"snapshots\":\"api/**\",\"text_patterns\":[\"\\\\d{4}-\\\\d{2}-\\\\d{2}\"]}],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true},\"tokens\":[{\"created_at\":\"\",\"id\":3,\"last_used_at\":null,\"name\":\"CircleCI\",\"prefix\":\"\"}],\"url\":\"https://app.visualci.test/-b/docs\"}", "type": "text" } ], "isError": false, "structuredContent": { "gallery": { - "enabled": true, + "enabled": false, "items": [], "manifest_url": null }, @@ -26,7 +26,7 @@ "forge": null, "forge_app_installed": false, "forge_webhook_at": null, - "gallery_enabled": true, + "gallery_enabled": false, "ignore_anti_aliasing": false, "ignore_rules": [ { diff --git a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project-4.json b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project-4.json index 63466abf..0c5f5509 100644 --- a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project-4.json +++ b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project-4.json @@ -17,7 +17,7 @@ "result": { "content": [ { - "text": "{\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":true,\"ignore_anti_aliasing\":false,\"ignore_rules\":[{\"json_paths\":[\"$.generated_at\"],\"snapshots\":\"api/**\",\"text_patterns\":[\"\\\\d{4}-\\\\d{2}-\\\\d{2}\"]}],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", + "text": "{\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":false,\"ignore_anti_aliasing\":false,\"ignore_rules\":[{\"json_paths\":[\"$.generated_at\"],\"snapshots\":\"api/**\",\"text_patterns\":[\"\\\\d{4}-\\\\d{2}-\\\\d{2}\"]}],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", "type": "text" } ], @@ -31,7 +31,7 @@ "forge": null, "forge_app_installed": false, "forge_webhook_at": null, - "gallery_enabled": true, + "gallery_enabled": false, "ignore_anti_aliasing": false, "ignore_rules": [ { diff --git a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project.json b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project.json index 6f5c94fb..a8a24a71 100644 --- a/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project.json +++ b/app/tests/golden/mcp/a_personal_token_manages_organizations_projects_and_tokens/update_project.json @@ -6,7 +6,7 @@ "result": { "content": [ { - "text": "{\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":true,\"ignore_anti_aliasing\":false,\"ignore_rules\":[],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", + "text": "{\"settings\":{\"ci_mode\":\"review\",\"comment_when_unchanged\":false,\"default_branch\":\"main\",\"dpi\":150,\"forge\":null,\"forge_app_installed\":false,\"forge_webhook_at\":null,\"gallery_enabled\":false,\"ignore_anti_aliasing\":false,\"ignore_rules\":[],\"name\":\"Docs\",\"notice\":null,\"open_source\":false,\"open_source_note\":null,\"open_source_pool\":false,\"open_source_withdrawn\":false,\"public\":false,\"renderer\":\"pdfbox\",\"repository_public\":false,\"repository_url\":null,\"slug\":\"docs\",\"threshold\":0.0,\"tokens_can_approve\":true}}", "type": "text" } ], @@ -20,7 +20,7 @@ "forge": null, "forge_app_installed": false, "forge_webhook_at": null, - "gallery_enabled": true, + "gallery_enabled": false, "ignore_anti_aliasing": false, "ignore_rules": [], "name": "Docs", diff --git a/skills/visualci-config/SKILL.md b/skills/visualci-config/SKILL.md index dd3e1817..633a653d 100644 --- a/skills/visualci-config/SKILL.md +++ b/skills/visualci-config/SKILL.md @@ -59,7 +59,7 @@ The build's page shows the file it was sent, and `get_build` returns it as `conf | `ci_mode` | `review`, `wait` or `strict`. The file can only make the project's mode stricter (in that order); a looser value is ignored, with a warning on the build. See [GitLab CI](https://visualci.com/docs/ci/gitlab.md#reviewing-without-a-github-check). | | `group_depth` | Large suites: how many leading path segments of a snapshot's name make its group, for runs checked by group (500 or more snapshots). By default, all but the last two. See [Large suites](https://visualci.com/docs/reference/credits.md#large-suites). | | `uploads` | What a bare `visualci upload` sends: a list of `path` (relative to the file), with optional `from` (`jest`, `vitest`, `insta`, `syrupy`, `rspec` or `auto`), `prefix` and `format`. | -| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it. See [Public gallery](https://visualci.com/docs/gallery.md). | +| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it and the project's gallery is on (a new project's starts off: `update_project` with `gallery_enabled: true`, or the project's settings page). See [Public gallery](https://visualci.com/docs/gallery.md). | Unknown fields are errors, so a misspelt field doesn't pass unnoticed. From aa3c1a96cc79578391c280cf62ac8c4a0c207214 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 17:28:31 +0000 Subject: [PATCH 2/3] Docs: turn the gallery on first; a new project's starts off --- crates/visualci-core/src/config.rs | 3 ++- frontend/content/docs/gallery.md | 4 +++- frontend/content/docs/reference/config.md | 2 +- skills/visualci-config/SKILL.md | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/visualci-core/src/config.rs b/crates/visualci-core/src/config.rs index 324bd852..4cc2f675 100644 --- a/crates/visualci-core/src/config.rs +++ b/crates/visualci-core/src/config.rs @@ -55,7 +55,8 @@ pub struct Config { #[serde(default, skip_serializing_if = "Vec::is_empty")] pub uploads: Vec, /// Screenshots to publish: their approved default-branch versions are served at public URLs and in an embeddable - /// gallery. Nothing is public unless a group includes it. + /// gallery. Nothing is public unless a group includes it and the project's gallery is on: a new project's starts off + /// (turn it on in the project's settings, or `update_project` with `gallery_enabled: true`). #[serde(default, skip_serializing_if = "Option::is_none")] pub gallery: Option, } diff --git a/frontend/content/docs/gallery.md b/frontend/content/docs/gallery.md index 2ee24737..d8d28f0c 100644 --- a/frontend/content/docs/gallery.md +++ b/frontend/content/docs/gallery.md @@ -9,7 +9,9 @@ Two examples: VisualCI's own [screenshots page](/screenshots/) and the images on ## Choose what's public -Name groups of screenshots in `visualci.yml`. Nothing is public unless a group includes it: +First turn the gallery on: a new project's gallery is off, so nothing it names is public until someone with admin rights switches it on in the project's **Settings** tab, or with `update_project` and `gallery_enabled: true` over MCP. While it's off, each build whose `visualci.yml` names a gallery says so in its warnings. + +Then name groups of screenshots in `visualci.yml`. Nothing is public unless a group includes it: ```yaml gallery: diff --git a/frontend/content/docs/reference/config.md b/frontend/content/docs/reference/config.md index 3610a170..ee7ab206 100644 --- a/frontend/content/docs/reference/config.md +++ b/frontend/content/docs/reference/config.md @@ -54,7 +54,7 @@ The build's page shows the file it was sent, and `get_build` returns it as `conf | `ci_mode` | `review`, `wait` or `strict`. The file can only make the project's mode stricter (in that order); a looser value is ignored, with a warning on the build. See [GitLab CI](/docs/ci/gitlab/#reviewing-without-a-github-check). | | `group_depth` | Large suites: how many leading path segments of a snapshot's name make its group, for runs checked by group (500 or more snapshots). By default, all but the last two. See [Large suites](/docs/reference/credits/#large-suites). | | `uploads` | What a bare `visualci upload` sends: a list of `path` (relative to the file), with optional `from` (`jest`, `vitest`, `insta`, `syrupy`, `rspec` or `auto`), `prefix` and `format`. | -| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it. See [Public gallery](/docs/gallery/). | +| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it and the project's gallery is on (a new project's starts off). See [Public gallery](/docs/gallery/). | Unknown fields are errors, so a misspelt field doesn't pass unnoticed. diff --git a/skills/visualci-config/SKILL.md b/skills/visualci-config/SKILL.md index 633a653d..adaf71f1 100644 --- a/skills/visualci-config/SKILL.md +++ b/skills/visualci-config/SKILL.md @@ -59,7 +59,7 @@ The build's page shows the file it was sent, and `get_build` returns it as `conf | `ci_mode` | `review`, `wait` or `strict`. The file can only make the project's mode stricter (in that order); a looser value is ignored, with a warning on the build. See [GitLab CI](https://visualci.com/docs/ci/gitlab.md#reviewing-without-a-github-check). | | `group_depth` | Large suites: how many leading path segments of a snapshot's name make its group, for runs checked by group (500 or more snapshots). By default, all but the last two. See [Large suites](https://visualci.com/docs/reference/credits.md#large-suites). | | `uploads` | What a bare `visualci upload` sends: a list of `path` (relative to the file), with optional `from` (`jest`, `vitest`, `insta`, `syrupy`, `rspec` or `auto`), `prefix` and `format`. | -| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it and the project's gallery is on (a new project's starts off: `update_project` with `gallery_enabled: true`, or the project's settings page). See [Public gallery](https://visualci.com/docs/gallery.md). | +| `gallery` | Screenshots to publish at public URLs, in groups: `groups` is a list of `name`, an optional `title`, and `include` (snapshot globs). Nothing is public unless a group includes it and the project's gallery is on (a new project's starts off). See [Public gallery](https://visualci.com/docs/gallery.md). | Unknown fields are errors, so a misspelt field doesn't pass unnoticed. From b218df349f9dde860571ab83d9aa06be3b7e87fa Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 17:36:54 +0000 Subject: [PATCH 3/3] Leave the schema's description as it was: the docs say it, and the CLI needn't change --- crates/visualci-core/src/config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/visualci-core/src/config.rs b/crates/visualci-core/src/config.rs index 4cc2f675..324bd852 100644 --- a/crates/visualci-core/src/config.rs +++ b/crates/visualci-core/src/config.rs @@ -55,8 +55,7 @@ pub struct Config { #[serde(default, skip_serializing_if = "Vec::is_empty")] pub uploads: Vec, /// Screenshots to publish: their approved default-branch versions are served at public URLs and in an embeddable - /// gallery. Nothing is public unless a group includes it and the project's gallery is on: a new project's starts off - /// (turn it on in the project's settings, or `update_project` with `gallery_enabled: true`). + /// gallery. Nothing is public unless a group includes it. #[serde(default, skip_serializing_if = "Option::is_none")] pub gallery: Option, }