@runeditrun/rer 0.2.52 → 0.2.53

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.
package/cli/bounded.mjs CHANGED
@@ -12,7 +12,7 @@ import {RerError} from './errors.mjs';
12
12
  // enter this boundary.
13
13
  export async function boundedCommand(project,options,argv,out){
14
14
  if(!['install','setup','build','verify','deploy','export','import'].includes(options.verb))return null;
15
- const {commandPolicy,queuedCommand,queueLabel}=await shared('queue.mjs');
15
+ const {commandPolicy,queuedCommand,queueLabel,maxWaitSeconds}=await shared('queue.mjs');
16
16
  const policy=await commandPolicy();
17
17
  const childArgs=[...argv];const cwdIndex=childArgs.indexOf('--cwd');if(cwdIndex>=0&&(childArgs.indexOf('--')<0||cwdIndex<childArgs.indexOf('--')))childArgs[cwdIndex+1]=project.root;
18
18
  const directory=await mkdtemp(join(tmpdir(),'rer-bounded-'));
@@ -65,6 +65,10 @@ export async function boundedCommand(project,options,argv,out){
65
65
  if(termination){
66
66
  out.error(new RerError('cancelled',`Stopped by ${termination} after owned children were stopped.`,exitCode));
67
67
  out.result(false,exitCode);
68
+ }else if(result.timedOut){
69
+ const {busyMessage}=await shared('busy.mjs');
70
+ out.error(new RerError('safety_refusal',busyMessage({...result,reason:store.redact(String(result.reason))},{verb:options.verb,maxWait:maxWaitSeconds}),exitCode));
71
+ out.result(false,exitCode);
68
72
  }else if(finalEvent&&finalEvent.exitCode===exitCode){
69
73
  if(errorEvent){
70
74
  let deployment={};
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.53
4
+
5
+ - **Dropdowns share one themed chevron rule.** Base's operator app and installer draw a 12 px chevron 14 px from the right border with 40 px end padding. Exported seeds can copy `selectStyle` from `src/base/select-style.ts`; its gradient strokes follow the theme color and work under the seed's content security policy. Focus, disabled, right-to-left and forced-color states are included (#247).
6
+ - **Queue wait timeouts explain the refusal.** Bounded build, deploy, install, setup, verify, export and import commands that reach the job queue's max wait say why they did not start and name the retry command, in terminal text and JSON, while keeping exit 75 (#253).
7
+
3
8
  ## 0.2.52
4
9
 
5
10
  - **Shared job queues use one slot limit.** Every client sharing a queue directory admits against the same limit, so an older shell requesting three slots no longer holds up a five-slot queue. A live `config.json` slot limit is authoritative; otherwise the largest live client request sets the limit. Clients requesting a different limit see the queue's effective limit and configuration path. FIFO ordering, load admission and available-memory admission stay in place (#244).
@@ -114,6 +114,54 @@ Declare the theme in two places that name the same file:
114
114
  Without a theme every page is unchanged. `default-seed/public/rer-theme.css`
115
115
  and the foundation template's `public/rer-theme.css` are worked examples.
116
116
 
117
+ ### Select chevron
118
+
119
+ Every dropdown on Base's own screens draws its chevron 14px in from the right
120
+ border and keeps 40px of end padding so text never runs under it. One rule
121
+ does this, and a seed's own pages adopt it too:
122
+
123
+ ```css
124
+ select:not([multiple],[size]:not([size="1"])){
125
+ --rer-select-ink:var(--rer-muted,light-dark(#475569,#a8b3c4));
126
+ appearance:none;
127
+ background-image:
128
+ linear-gradient(to top right,transparent calc(50% - 1.1px),var(--rer-select-ink) calc(50% - .55px),var(--rer-select-ink) calc(50% + .55px),transparent calc(50% + 1.1px)),
129
+ linear-gradient(to top left,transparent calc(50% - 1.1px),var(--rer-select-ink) calc(50% - .55px),var(--rer-select-ink) calc(50% + .55px),transparent calc(50% + 1.1px));
130
+ background-repeat:no-repeat;
131
+ background-position:right 20px center,right 14px center;
132
+ background-size:6px 6px;
133
+ padding-inline-end:40px;
134
+ }
135
+ ```
136
+
137
+ The two gradient strokes form one 12px chevron whose right edge is 14px from
138
+ the border. The full rule also carries the `:focus-visible`, `:disabled`,
139
+ right-to-left and `forced-colors` variants. Multi-selects and `size` lists keep
140
+ their native look.
141
+
142
+ - **Adopt it by copying.** Copy the whole rule from
143
+ `foundation/runtime/select-style.ts` (exported as `selectStyle`, which both
144
+ exporters place at `src/base/select-style.ts`). A seed whose pages use
145
+ `pageStyle` already has it. A seed with its own stylesheet pastes the CSS
146
+ into it, or imports `selectStyle` into a `<style>` tag. The installer's copy
147
+ is in `ui/style.css`. A seed rule that sets `padding-right` on selects
148
+ with higher specificity than the rule's `select:not(...)` (a `#id` selector,
149
+ say) overrides the 40px end padding: keep it at 36px or more.
150
+ - **Recolour it with the theme.** The chevron reads `--rer-muted`, so a seed
151
+ that declares its theme tokens needs nothing else: the installer, `/app` and
152
+ every page using the rule draw it in that colour. A seed that wants another
153
+ colour sets `--rer-select-ink` on `:root` (or one container); focus switches
154
+ it to `--rer-text` and a disabled select dims it. For a dark scheme, declare
155
+ `color-scheme: light dark` and dark values for `--rer-muted` and
156
+ `--rer-text`; the neutral fallbacks use `light-dark()` and follow it. The
157
+ chevron is drawn with gradients so it can read a variable; an SVG data URI
158
+ cannot.
159
+ - **Keep the rule's geometry.** The browser checks (the installer's
160
+ `ui/browser-check.mjs` and the default seed's private-response browser test)
161
+ assert, at 1440 and 390, that every visible single select has no native
162
+ appearance, at least 36px of right padding and its chevron 10-16px from the
163
+ right edge.
164
+
117
165
  ## Setup behavior and custody
118
166
 
119
167
  Setup validates answers before effects, then uses the declared lifecycle to
@@ -3,7 +3,7 @@ import { busyFailure } from './failures.mjs';
3
3
  // A queued step the job queue never admitted is a busy machine, not a failed
4
4
  // command: say what held it, the limit and the next step, in the same plain form
5
5
  // as the server load guard (cli/server-resources.mjs).
6
- const commandNames = new Set(['dev', 'setup', 'preview', 'build', 'deploy', 'verify']);
6
+ const commandNames = new Set(['install', 'setup', 'dev', 'preview', 'build', 'verify', 'deploy', 'export', 'import']);
7
7
 
8
8
  function waited(seconds) {
9
9
  return seconds >= 60 ? `${Math.round(seconds / 60)} minutes` : `${Math.round(seconds)} seconds`;
@@ -4,7 +4,8 @@ import { createHash } from 'node:crypto';
4
4
  import { readFile, realpath } from 'node:fs/promises';
5
5
  const portable = basename(dirname(fileURLToPath(import.meta.url))) === 'base-onboarding';
6
6
  const queueURL = new URL(portable ? '../base-cli/modules/job-queue/' : '../modules/job-queue/', import.meta.url);
7
- export const maxWaitSeconds = 1200;
7
+ // Keep the operational default while allowing callers to bound admission sooner.
8
+ export const maxWaitSeconds = Number(process.env.RER_JOBS_MAX_WAIT_SECONDS ?? 1200);
8
9
  export const heavyVerbs = new Set(['install', 'setup', 'build', 'verify', 'dev', 'preview', 'deploy', 'release', 'export', 'import', 'installer']);
9
10
  export const verificationBoundary = verb => verb === 'release' || verb === 'verify' || verb?.startsWith('verify:');
10
11
  // The seed's display name (seed.json `name`, else its folder name) for terminal lines,
@@ -4,7 +4,9 @@
4
4
 
5
5
  .agent-activity.known-group{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:0;border-radius:13px;background:linear-gradient(110deg,rgba(38,60,116,.5),rgba(132,118,143,.5));overflow:hidden;margin-bottom:16px}.known-group-header{display:flex;align-items:center;gap:16px;padding:16px 15px 7px}.known-group-title{font-size:16px;margin:0;font-weight:700;line-height:1.3}.category-icon{width:36px;height:36px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:linear-gradient(135deg,#aa98ff,#e5d1ff);color:#412199;box-shadow:inset 0 0 8px #ffffff44}.category-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.workspace .category-icon{background:linear-gradient(135deg,#a2dbff,#4fa9f5);color:#0070df}.hosting .category-icon,.email .category-icon{background:linear-gradient(135deg,#0ed4b6,#31f2cf);color:#005761}.known-group-body{padding:6px 16px 13px 23px}.known-group .known-row:last-child{padding-bottom:0}#known-summary .known-label{font-size:11px}.known-row{min-width:0}.known-editor{min-width:0}.group-symbols{position:absolute;width:0;height:0;overflow:hidden}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:700px){.known-group-header{gap:12px}.known-group-body{padding-left:15px}.known-group-title{font-size:15px}}
6
6
 
7
- #fields>.field[data-field]{border:0;border-radius:0;background:transparent;padding:0}#fields{gap:24px}.select-wrap{position:relative}.select-wrap:after{content:"";position:absolute;right:18px;top:50%;width:7px;height:7px;border-right:1.5px solid #64788e;border-bottom:1.5px solid #64788e;transform:translateY(-70%) rotate(45deg);pointer-events:none}.select-wrap select{appearance:none;-webkit-appearance:none;padding-right:44px}
7
+ #fields>.field[data-field]{border:0;border-radius:0;background:transparent;padding:0}#fields{gap:24px}.select-wrap{position:relative}
8
+ /* The shared select rule: foundation/runtime/select-style.ts, documented under "Select chevron" in README.md. */
9
+ select:not([multiple],[size]:not([size="1"])){--rer-select-ink:var(--rer-muted,light-dark(#475569,#a8b3c4));appearance:none;-webkit-appearance:none;background-image:linear-gradient(to top right,transparent calc(50% - 1.1px),var(--rer-select-ink) calc(50% - .55px),var(--rer-select-ink) calc(50% + .55px),transparent calc(50% + 1.1px)),linear-gradient(to top left,transparent calc(50% - 1.1px),var(--rer-select-ink) calc(50% - .55px),var(--rer-select-ink) calc(50% + .55px),transparent calc(50% + 1.1px));background-repeat:no-repeat;background-position:right 20px center,right 14px center;background-size:6px 6px;padding-inline-end:40px;text-overflow:ellipsis}select:not([multiple],[size]:not([size="1"])):dir(rtl){background-position:left 14px center,left 20px center}select:not([multiple],[size]:not([size="1"])):focus-visible{--rer-select-ink:var(--rer-text,light-dark(#172033,#f1f5f9))}select:not([multiple],[size]:not([size="1"])):disabled{--rer-select-ink:color-mix(in srgb,var(--rer-muted,light-dark(#475569,#a8b3c4)) 55%,transparent);color:var(--rer-muted,light-dark(#475569,#a8b3c4));cursor:not-allowed}@media(forced-colors:active){select:not([multiple],[size]:not([size="1"])){--rer-select-ink:ButtonText}}
8
10
 
9
11
  .known-value{display:flex;align-items:center;gap:7px;min-width:0}.known-value-text{min-width:0;overflow-wrap:anywhere}.value-icon,.colour-swatch{width:18px;height:18px;flex-shrink:0}.colour-swatch{width:16px;height:16px}.value-icon{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.colour-swatch{border-radius:4px;box-shadow:inset 0 0 0 1px #ffffff70}
10
12
 
@@ -12,7 +12,6 @@
12
12
  .rer-themed .input{border-color:var(--rer-border);background:var(--rer-surface);color:var(--rer-text);border-radius:calc(var(--rer-radius,20px) / 2)}
13
13
  .rer-themed .input:focus-visible,.rer-themed button:focus-visible,.rer-themed a:focus-visible,.rer-themed summary:focus-visible,.rer-themed .target-choice:has(input:focus-visible){outline-color:var(--rer-focus)}
14
14
  .rer-themed .help,.rer-themed .status,.rer-themed .step-progress,.rer-themed .advanced summary,.rer-themed .target-choice .help,.rer-themed .failure-log-path,.rer-themed .agent-activity-history,.rer-themed .known-editor .help{color:var(--rer-muted)}
15
- .rer-themed .select-wrap:after{border-color:var(--rer-muted)}
16
15
  .rer-themed .edit,.rer-themed .field .edit,.rer-themed .panel .edit,.rer-themed .help-link,.rer-themed #known-summary .known-group .edit,.rer-themed .editor-actions button{color:var(--rer-link,var(--rer-text))}
17
16
  .rer-themed .primary,.rer-themed .secondary,.rer-themed .agent-connect{font-family:inherit;border-radius:var(--rer-radius,25px)}
18
17
  .rer-themed .primary{background:var(--rer-accent,var(--installer-accent,#7542d3));color:var(--rer-accent-text,var(--installer-accent-text,#fff));box-shadow:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeditrun/rer",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "description": "The rer command: install, set up, run and launch Run Edit Run checkouts.",
5
5
  "license": "MIT",
6
6
  "type": "module",