@colony2/cortex 0.0.40 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +97 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@ embedded React UI from one executable.
7
7
 
8
8
  Cortex connects to a remote [JobDB](https://github.com/colony-2/jobdb) server.
9
9
  Run c2j workers separately against the same JobDB. Projects in the UI are JobDB
10
- tenants; cells are the current Git repository and its c2j-configured dependents.
10
+ tenants; cells are durable named records in JobDB, with generated IDs and repository locators.
11
11
 
12
12
  ## Goal list filters and search
13
13
 
@@ -18,12 +18,20 @@ items or use Select all / Select none, then Apply. Selecting none shows no jobs.
18
18
  Finished (outcome unavailable) matches
19
19
  completed jobs with no stored outcome; retrying jobs retain their scheduling
20
20
  status even if a previous attempt failed. The Cell column uses the same checkbox
21
- controls, with all cells selected initially. Its choices come from cell names in
22
- the returned jobs, including Unknown cell for missing names, rather than the server's
23
- configured cell catalogue. Cell filtering runs in the browser on the current page;
24
- unchecked cells remain available in the menu. Status filtering runs across pages.
25
-
26
- Search full prompts at the right of the Cancel/Delete row, including text beyond the shortened row
21
+ controls, with all cells selected initially. Choices come from the JobDB registry,
22
+ including cells with no jobs and retired cells for historical inspection. Cell and
23
+ status filters run on the backend before pagination. URLs store stable cell IDs;
24
+ renames preserve selections and refresh displayed names. Missing required cell
25
+ fields produce a protocol error rather than an inferred identity.
26
+
27
+ The **Inbox / All jobs** selector controls visibility independently of execution
28
+ status. Inbox is the default and includes finished jobs until they are archived.
29
+ **Archive selected** removes jobs from the inbox and cancels unfinished work;
30
+ history and artifacts remain available through All jobs and goal overview.
31
+ Restoring jobs to the inbox is not currently supported. The selected view stays
32
+ in the URL; switching views clears pagination and selected jobs.
33
+
34
+ Search full prompts at the right of the Cancel/Archive row, including text beyond the shortened row
27
35
  label and prompts from other loaded attempts. Click the Goal, Status, Cell, or
28
36
  Submitted column header to sort ascending or descending; click again to restore
29
37
  the original order. Search and sorting run in the browser on the current page.
@@ -35,8 +43,73 @@ parameter still filters raw scheduling states; the two parameters cannot be
35
43
  combined. Display filtering scans compact JobDB pages without loading job
36
44
  details. Each request scans at most 20 backend pages, so a sparse or empty result
37
45
  can still have a `next_page_token`; use **Next jobs** to continue.
38
- Repeated `cell` parameters (for example `?cell=alpha&cell=beta`) match jobs from
39
- either cell's repository before pagination; a single `cell` works as before.
46
+ Repeated `cellNames` parameters (for example `?cellNames=alpha&cellNames=beta`)
47
+ match jobs owned by either named cell before pagination. Repository selectors and
48
+ the old `cell` query parameter are no longer accepted.
49
+ `includeHidden=true` includes jobs archived from the inbox; omitted or `false`
50
+ keeps the inbox view. It composes with status, cell and goal filters before
51
+ pagination. Goal overview includes archived attempts.
52
+
53
+ ## Review document previews
54
+
55
+ Reviews support Markdown, unified and side-by-side patches, raster images, JSON,
56
+ JSONL, logs and source files. Source views provide line numbers, search and wrapping.
57
+ JSON formatting preserves large numbers and duplicate keys. HTML and SVG appear
58
+ as source; archives remain downloads. Unknown binary files have a hex preview.
59
+
60
+ Previews are read-only and bounded. Text loads up to 2 MiB; structured previews
61
+ require complete inputs within 1 MiB and 20,000 lines. Raster previews allow up to
62
+ 16 MiB and 32 megapixels. Banners identify limited previews, and Download always
63
+ returns the complete original bytes. Markdown images load only from unambiguous
64
+ attachments in the current review.
65
+
66
+ ## Phones and new goals
67
+
68
+ Phone reviews list documents without embedding their full contents. **Read** opens
69
+ a full-screen reader with one vertical scrolling area; **Back to review** returns
70
+ to the same response draft and attachments. **Document options** provides source,
71
+ document selection, and download. Request details, goal context, and instructions
72
+ remain available through disclosures.
73
+
74
+ Below 768px, navigation opens from **Open navigation**, and goals, attempts, and
75
+ cells use cards. Goal cards start with a two-line prompt, status, cell, and attempt
76
+ count; expand a card for submission time, related links, and inspection.
77
+ **Filters and sorting** reveals search and the existing controls. The phone
78
+ filter dialogs retain Select all / Select none / Apply;
79
+ search and sorting keep the same current-page and URL behavior as the desktop list.
80
+ Story and details stack vertically, with a **View selected details** jump link.
81
+
82
+ **New goal** selects an active registered cell. A single cell filter seeds the
83
+ picker, and the selected ID is resolved to its current name before submission.
84
+ Existing-cell submission uses the registry repository. **New cell** mode requires
85
+ an explicit name and repository. It registers the cell first, then submits the goal.
86
+ If submission fails, the cell remains registered; retrying reuses the completed
87
+ registration and the same job ID for an unchanged request.
88
+
89
+ ## Cells and creation
90
+
91
+ The Cells page lists the registry with active/retired/all filters,
92
+ exact-name/alias lookup, and pagination. **Create cell** requires a name and
93
+ repository, with optional description and JSON metadata. It registers a cell
94
+ without submitting work; creating or publishing its Git repository is separate.
95
+ Hosted repository locators, HTTPS URLs, and supported SSH forms are normalized by
96
+ JobDB. Local filesystem paths cannot serve as cell identity.
97
+
98
+ A cell's detail page shows its current name, repository, state, aliases and metadata.
99
+ **Goals for this cell** opens the goals list filtered by its stable ID;
100
+ **New goal in this cell** preselects it for submission. Retired cells remain
101
+ inspectable but cannot receive new jobs. `root` is an ordinary cell name with no
102
+ special designation or creation restrictions.
103
+ Cell editing and retirement UI are deferred.
104
+
105
+ Job rows display current cell names while retaining each job's submitted repository
106
+ snapshot. Changing a registry repo does not change historical source links.
107
+
108
+ This release requires compatible JobDB/c2j workers and fresh execution stores.
109
+ Old jobs, pagination cursors and saved execution selections are unsupported; deploy
110
+ the server and bundled UI together. See the
111
+ [cell upgrade plan](docs/Cortex-Cell-Registry-Upgrade-Plan.md) for cutover details.
112
+ Authentication and user-specific permissions are outside this migration.
40
113
 
41
114
  ## Chapter downloads
42
115
 
@@ -115,7 +188,7 @@ jobdb: http://localhost:9047/c2
115
188
  If your project still uses `.c2j/config.yaml`, move it to `.c2/config.yaml`;
116
189
  c2j no longer discovers configuration in the old directory.
117
190
 
118
- Run `cortex` from that cell or a subdirectory, or select the discovery directory
191
+ Run `cortex` from that cell or a subdirectory, or select the configuration directory
119
192
  with `--working-dir`. Cortex requires a remote HTTP(S) JobDB server; `embed:///`
120
193
  is not supported.
121
194
 
@@ -201,12 +274,24 @@ browser before running the tests:
201
274
 
202
275
  ```sh
203
276
  PLAYWRIGHT_BROWSERS_PATH="${CORTEX_PLAYWRIGHT_BROWSERS_PATH:-$HOME/.cache/ms-playwright}" \
204
- pnpm --filter @colony2/app exec playwright install --with-deps --only-shell chromium
277
+ pnpm --filter @colony2/app exec playwright install --with-deps chromium
205
278
  ```
206
279
 
280
+ Install full Chromium as well as its headless shell: the native 200% zoom test
281
+ loads a temporary extension in a fresh browser profile and verifies
282
+ `chrome.tabs.setZoom`/`getZoom`, layout dimensions, and device-pixel ratio. The
283
+ extension exists only during testing and is never bundled into the app.
284
+
207
285
  The Nix Chromium package targets Linux workers; macOS developers can use the
208
286
  Playwright installation command above.
209
287
 
288
+ The image-review recipes also require a full `ffmpeg` executable on `PATH`,
289
+ with PNG, JPEG, GIF, WebP, AVIF and BMP encoding support. Playwright's bundled
290
+ video recorder does not satisfy this requirement. CI installs the pinned
291
+ `imageio-ffmpeg==0.8.1` binary distribution for Linux x64/ARM64 and macOS ARM64
292
+ and checks all fixture encoders before running the suite. Local Nix workers
293
+ already declare full FFmpeg in `.c2/config.yaml`.
294
+
210
295
  Setting `CORTEX_PLAYWRIGHT_BROWSERS_PATH` selects that Playwright installation
211
296
  even when system browsers are on `PATH`, as in CI. Otherwise, system executables
212
297
  are used only when both Chromium and FFmpeg are available; an incomplete pair
@@ -226,7 +311,7 @@ and restart it to verify the exact recipe output and completed story. They also
226
311
  cover cancellation from another client, rejected late answers, and consecutive
227
312
  prompts in one job without reloading either tab. Each test has a separate tenant
228
313
  and temporary Git repository; the fixture cell's Git URL
229
- is mapped to that repository in the worker's environment. No API or EventSource
314
+ is mapped to that repository by a test-only Git transport shim in the worker's PATH. No API or EventSource
230
315
  mocks are used in these tests. Worker logs and recipe outcomes are attached to
231
316
  the Playwright report in `web/app/playwright-report`.
232
317
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colony2/cortex",
3
- "version": "0.0.40",
3
+ "version": "0.0.44",
4
4
  "description": "Web interface for c2j recipe jobs",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/colony-2/cortex",