diff --git a/.claude/skills/frontend-design/LICENSE.txt b/.claude/skills/frontend-design/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ade750b16ba50a06c955c07a75f5f82bdd3c5331 --- /dev/null +++ b/.claude/skills/frontend-design/LICENSE.txt @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/.claude/skills/frontend-design/SKILL.md b/.claude/skills/frontend-design/SKILL.md new file mode 100644 index 0000000000000000000000000000000000000000..4f8f4a2adbde3b34e32c0122a8a8f66f991d95f1 --- /dev/null +++ b/.claude/skills/frontend-design/SKILL.md @@ -0,0 +1,71 @@ +--- +name: frontend-design +description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. +license: Complete terms in LICENSE.txt +--- + +# Frontend Design + +Approach this as the design lead at a design studio known for giving every client a distinct visual identity that is not mistaken for anyone else's. This client has already rejected proposals that felt cliché or templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take aesthetic risk if justified. + +## Ground your designs in the subject matter + +If the brief does not identify what the product or subject matter is, identify it yourself before designing, and confirm with the client. You can come up with one concrete subject, the design's audience, and the design's primary job, as a proposal. If there's any information in your memory about the client's preferences or context about what they're building, use that as a hint. The subject's industry, subject matter, materials, and vernacular are where distinctive visual choices come from — a design for a toy for girls aged 8–11 will be very aesthetically different from a dashboard for financial analysts. Build with the brief's real content and subject matter throughout. + +## Design principles + +For web designs, the hero is the first thing viewers will see. Open with the most characteristic thing in the subject's world, in the form that is most appropriate: a headline, an image, an animation, a live demo, an interactive moment, or other treatments. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the default treatment, so only use it if that's truly the best option. + +Typography carries the personality of the page. You don't need a different typeface for display or headline text and body content: use one family or two, and if two, make them clearly distinct. + +Choose your typefaces deliberately, not the default families you would reach for on any other project, and set a clear type scale following the default guidance of The Elements of Typographic Style with intentional weights, widths, and spacing. When type is used as a headline or visual element, use the type treatment itself as an active part of the design, not a neutral delivery vehicle for the content. + +Default to line lengths of less than 80 characters. Serif typefaces can have slightly longer line lengths; give serif body text slightly more line-height than a sans-serif. + +Avoid these default typographic treatments; they are the commonest tells of a generated page: +- Accenting just a single word or phrase in a headline, like putting one word in italic/bold or a different color. +- Using all caps for labels. +- Adding unnecessary typographic labels above content. + +Visual structure is information. Structural devices like outlines, borders, numbering, eyebrows, dividers, labels, etc., encode useful information about the content rather than decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence — like a stepped process or a timeline. Before adding numbered markers, check the content really is a sequence. + +Use non-user-triggered motion sparingly and deliberately, only to draw attention. A single orchestrated moment — one page-load sequence or one reveal — lands better than scattered effects; fade-and-slide-up entrances on each section and hover transitions on every card are the generic default and read as AI-generated. Motion that answers a person's action (opening, expanding, confirming) is welcome when it shows what changed. + +Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy and placeholder content. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance. + +## Process: plan, review against the brief, build, critique + +For calibration, AI-generated design right now clusters around some traits: +1. a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta or warm-clay accent (often near #D97757 — Anthropic's own Claude-interaction accent, so on a user's brief it reads as a tell); +2. a near-black background with a single bright acid-green or vermilion accent; +3. a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns; +4. the SaaS-card kit: content chopped into identical rounded cards, one border-radius on everything regardless of hierarchy, the same soft grey shadow (rgba(0,0,0,.1)) under each, and gradient washes as decoration; +5. template chrome that appears whatever the subject: a tracked-out ALL-CAPS eyebrow label above every heading; meta strings joined with middle dots ('A · B · C'); labels built as 'WORD — fragment' with a spaced em dash; tinted near-black (#0B0B0B, #111) standing in for black; a monospace face for small data labels; a '→' appended to link and button text. + +All traits are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. As with a hired human designer, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn. + +Work in two passes. First, brainstorm a short design plan based on the client's design brief: create a compact token system with color, type, layout, and principles. +- Color: describe the core base palette as 4–6 named hex values. +- Type: the typefaces and their roles. +- Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Include alignment guidance; should the content be left aligned, center aligned, justified? +- Principles: the high-level guidance for what makes this page unique. + +Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan. + +When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and an element-based selector like .cta). This can happen often with padding/margin between sections. + +## Restraint and self-critique + +Spend your boldness in one place. Let one element be the memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected, visually accessible, harmonious color palettes. Critique your own work as you build, taking screenshots to review if your environment supports it — a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creatives have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes. + +## More on writing in design + +Words appear in a design for one reason: to make it easier to understand and use. They are design content, not decoration. Bring the same intentionality and minimalism to copywriting that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience. + +Write from the end user's perspective. Name things by what users will understand in simple language, not by how the system is built. A user manages notifications, not webhook config. Describe what something is or does in plain terms rather than selling it. Being specific and legible to new users is always better than being clever. + +Use active voice as default. A CTA says exactly what happens when it is used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around. + +Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act. + +Keep the tone conversational: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each written element do exactly one job. diff --git a/.claude/skills/frontend-design/SOURCE.md b/.claude/skills/frontend-design/SOURCE.md new file mode 100644 index 0000000000000000000000000000000000000000..0d97eb7a489819035f181382f284b04ef25f29d5 --- /dev/null +++ b/.claude/skills/frontend-design/SOURCE.md @@ -0,0 +1,3 @@ +# Source + +Copied unmodified from https://github.com/anthropics/skills (skills/frontend-design), Apache License 2.0 (LICENSE.txt). diff --git a/docs/design/UI-REDESIGN.md b/docs/design/UI-REDESIGN.md index 2ae737cb98df45e544863bf9bd3676ec45b24fd2..fbd4119b59c4ac244bd893a392081eda3baf2438 100644 --- a/docs/design/UI-REDESIGN.md +++ b/docs/design/UI-REDESIGN.md @@ -8,6 +8,8 @@ This is a **redesign of layout and look only**. Every current function stays ava the checklist). No route is removed. No new backend endpoint is needed for steps 1 to 7. Step 8 (scheduled runs "once" / "cron", pause, edit) needs the small backend additions listed in section 7.1, and the UI for those parts stays hidden until they exist. +> **Amended 20 Oct 2026 by `UI-SIMPLIFY.md`** (calm palette, one accent, colour only for states, no caps labels, readiness shows the last finished verdict). Where the two disagree, `UI-SIMPLIFY.md` wins. Sections marked *Superseded* below point to it. Sections 9 and 10 are unchanged and still binding. + Contents 0. What the current app does well and where it hurts @@ -237,6 +239,8 @@ Phone panel sheet (opened from [panel] or from "See the failed screen"): ### 2.4 Sidebar spec (`AppSidebar`) +> *Amended by UI-SIMPLIFY 3.1:* grey sidebar, sentence-case group headings, status as dot + word (no badge pills). The env cue is amber text for practice and neutral text for Fusion. "New test run" is a secondary button. + Top to bottom, 264px wide, padding 12px 10px, background `--fpt-sidebar`: 1. **Brand row** (48px): the existing `.fpt-mark` initials + product name (`useBrand`), org name small below. `data-testid="brand"` stays. @@ -408,6 +412,8 @@ TOP BAR: Procure-to-Pay · 26C · 17 Oct 11:24 | Practice environment · Quick s #### 3.1.2 Conversation content +> *Amended by UI-SIMPLIFY 3.2:* the kicker becomes the sentence-case line "Step 2 of 4: approve the scenarios"; the progress bar is neutral with an accent current segment; phase separators are sentence case; the result card has no filled verdict band. + The thread is the current `Conversation` component (AssistantPage.tsx) with these changes: 1. **Stage progress line** replaces the Mantine `Stepper` (which breaks at 390px): a 4-segment bar in the current-stage card header, @@ -483,6 +489,8 @@ changes · Activity log · label "Engineering views (admin)" · Coverage map · ### 3.2 Team board (upgrade of the Workflow tab, `/runs/:id/workflow`) +> *Amended by UI-SIMPLIFY 3.4 and UI-REVIEW-2:* neutral avatars, no coloured phase borders, colour only on waiting / failed / paused cards. The engine label is what actually ran. Columns follow the container width. + Purpose: the 15 agents as teammates of a team lead ("Coordinator"), each with live state, last action, and flags for failed or silent ones. ``` @@ -658,6 +666,8 @@ Report & sign-off ### 3.6 Patch readiness home ("release cockpit", `/`) +> *Superseded by UI-SIMPLIFY 3.8:* no KPI tiles, no tinted release band, no separate Needs-you box. Each area shows its **last finished verdict** plus a line for a newer in-progress run. + ``` TOP BAR: Patch readiness [Environment: Local mock pod v] [Patch: latest v] [+ New test run] ------------------------------------------------------------------------------------------------------- @@ -845,6 +855,8 @@ tokens below. All text pairs verified (WCAG 2.1 contrast, computed): ### 4.1 Colour +> *Superseded by UI-SIMPLIFY.md section 2:* neutral greys, a single blue accent `#2b59c3` / `#8ea8f0`, and status colours only for verdicts, waiting-for-you, failures and the practice warning. "Running" is neutral. The Fusion pod cue is neutral, not blue. + | Token | Light | Dark | Use / contrast | |---|---|---|---| | `--fpt-page` | #e9f0ee (unchanged) | #0c1110 | app background behind panels (now only visible in gaps) | @@ -870,6 +882,8 @@ Status is never conveyed by colour alone: every dot has an icon or words next to ### 4.2 Type (Poppins stays; sizes nudged up for readability) +> *Amended:* weights 400 and 600 only; no uppercase or letter-spaced labels anywhere (UI-SIMPLIFY 2.4). + | Mantine size | Old | New | Use | |---|---|---|---| | `xs` | 11px | 11.5px | meta, pills | diff --git a/docs/design/UI-SIMPLIFY.md b/docs/design/UI-SIMPLIFY.md new file mode 100644 index 0000000000000000000000000000000000000000..711e457741993956f6839e07f9d61457de5583a0 --- /dev/null +++ b/docs/design/UI-SIMPLIFY.md @@ -0,0 +1,408 @@ +# Make the UI calm and simple + +Status: binding for every UI step from now on. Where this file and `UI-REDESIGN.md` disagree, this file wins; `UI-REDESIGN.md` +carries notes pointing here. It also contains the review of step 5 (`d82d618`) and of the review-3 fixes (`bdd5b0e`), which was +cut off earlier (section 6). + +Why: the person using the product said the screens use too many colours and should be simple and easy to understand. Looking at the +step-5 screenshots with the `frontend-design` skill (`.claude/skills/frontend-design/SKILL.md`) in hand, they are right. A single +readiness screen (`shots/step5/readiness-desktop-light.png`) shows: +- a mint-tinted band; +- five tiles with five coloured left borders; +- an amber caps "NEEDS YOU" box; +- seven blue process chips and one amber one; +- an amber verdict pill; +- three black buttons; +- an amber sidebar footer and amber sidebar badges; +- a red dot. + +Nothing tells the eye where to look first. + +What stays the same: every function, route, test id, accessible name and permission check (`UI-REDESIGN.md` sections 9 and 10). The +honesty cues stay too: +- practice environment versus Oracle Fusion; +- engine labels that say what actually ran; +- human approval kept prominent. + +This is a change of colour, emphasis and wording, not of features. + +--- + +## 1. Principles + +1. **Neutral by default.** Backgrounds, surfaces, text, borders, tables, chips and avatars are greys. A screen in its resting state is + black text on white with grey lines. +2. **One accent, two jobs.** The brand accent (blue) is used only for: + - the **primary action** of the screen (one per screen); + - the **current selection** (active nav item, active tab, selected run, focus ring). + + It is never a background for decoration, never a chart colour and never a status. +3. **Colour means "look at this".** Green, amber and red appear only where a person must notice a state: + - a verdict: Ready, Not ready, On hold; + - something waiting for you; + - a failure or a stopped run; + - the practice-environment warning. + + If removing the colour would not make anyone miss something, remove it. +4. **One loud thing per screen.** On each screen, pick the single element that matters (usually the verdict or the waiting action). It + gets the colour and the weight; everything around it is quiet. +5. **Structure only where it carries meaning.** + - Borders, cards, numbering, dividers and labels exist only when they separate or order real content. + - Numbering is used only for true sequences (the 4 run stages, the 6 workflow phases). + - No ALL-CAPS eyebrow labels anywhere. + - No middle-dot meta strings longer than two parts. + - No tinted bands. + - No identical shadowed cards stacked for every block. +6. **Plain words, sentence case, one job per element.** + - Headings are short sentences ("Waiting for you", "Business areas"). + - An action keeps the same name across the flow. "Approve", for example, everywhere: the button, the toast "Approved" and the run + state "Approved". + - Text that repeats the heading or a neighbouring element is cut. +7. **Status is never colour alone.** Every coloured state also has a word or icon. This is unchanged. + +--- + +## 2. Palette (exact tokens, light and dark) + +All text pairs are WCAG AA (computed). Non-text graphics (dots, focus ring, active-tab underline) are at least 3:1. Existing token +names are kept; their values change. + +### 2.1 Neutrals and accent + +| Token | Light | Dark | Use | Contrast | +|---|---|---|---|---| +| `--fpt-page` | `#ffffff` | `#121314` | app background (was mint `#e9f0ee`) | — | +| `--fpt-surface` | `#ffffff` | `#17181a` | center, panel, menus | — | +| `--fpt-surface-2` | `#f6f7f8` | `#1e1f22` | hover rows, table header, inset areas | — | +| `--fpt-sidebar` | `#f6f7f8` | `#151618` | sidebar (was mint-tinted) | text 15.7:1 / 14.4:1 | +| `--fpt-border` | `#e4e5e8` | `#2c2e31` | all 1px lines | — | +| `--fpt-line` | `#d4d6da` | `#3a3c40` | stronger dividers (rare) | — | +| `--fpt-text` | `#1c1d1f` | `#e6e7e9` | body text | 16.9:1 / 14.4:1 | +| `--fpt-dim` | `#5c6066` | `#a0a4aa` | secondary text | 6.3:1 on white, 5.9:1 on sidebar / 7.1:1 | +| `--fpt-accent` (new) | `#2b59c3` | `#8ea8f0` | primary button fill, active nav/tab, links, focus | white on it 6.3:1 / `#121314` on it 8.0:1 | +| `--fpt-accent-text` (new) | `#ffffff` | `#121314` | text on accent fill | as above | +| `--fpt-selected` (new) | `#eef2fb` | `#232a3a` | background of the selected nav item / run row | text 15.0:1 / 11.6:1; accent 5.6:1 | +| `--fpt-focus` | `#2b59c3` | `#8ea8f0` | focus ring (same as accent) | 6.3:1 / 7.6:1 | +| `--fpt-ink` / `--fpt-ink-text` | **aliases of** `--fpt-accent` / `--fpt-accent-text` | | kept so existing CSS keeps working | | +| `--fpt-band`, `--fpt-mint-card`, `--fpt-lav-card` | `transparent` | `transparent` | retired: tinted bands are removed; keep the names to avoid breakage | | + +Mantine: change `primaryColor` from `ink` to a new `accent` tuple whose shade 6 is `#2b59c3`: + +```ts +['#eef2fb', '#d9e2f6', '#b3c4ec', '#8ea8f0', '#5f80db', '#4469cf', '#2b59c3', '#234aa6', '#1c3c88', '#152d66'] +``` + +Delete the dark-mode `--mantine-color-ink-*` overrides and the button/checkbox/radio colour hacks. Instead, in dark mode set +`--mantine-color-accent-filled: #8ea8f0` and `--mantine-color-accent-filled-hover: #a9bdf4`, with a button text colour of `#121314`, under +`:root[data-mantine-color-scheme='dark']`. Keep `mint` and `lavender` tuples only if still referenced; no new usage. + +**Secondary buttons** are `variant="default"`: surface background, `--fpt-border` 1px, `--fpt-text` label. **Tertiary** actions are +`variant="subtle"` text buttons in `--fpt-text` (not accent), so the accent stays rare. + +### 2.2 Status colours (only for states a person must notice) + +| State | Token (fg / bg) light | Dark | Where it is allowed | +|---|---|---|---| +| Ready / passed | `--pill-green-fg #1e6b34` / `--pill-green-bg #e9f5ec` (5.8:1) | `#7ccf92` / `#1b2a20` (8.0:1) | verdict word, passed count in a result | +| Waiting for you / paused | `--pill-amber-fg #8a4b00` / `--pill-amber-bg #fdf3e1` (6.2:1) | `#f0b44c` / `#2e2615` (8.1:1) | the waiting chip, the action card's 3px left edge, sidebar "Needs you" dot | +| Not ready / failed / stopped with error | `--pill-red-fg #b42318` / `--pill-red-bg #fdecea` (5.8:1) | `#f39a92` / `#33201f` (7.2:1) | verdict word, failure count, "What happened" | +| Status dots (graphics) | green `#2e8540` 4.6:1, amber `#c26a00` 3.9:1, red `#c62828` 5.6:1, idle `#8a8f98` 3.3:1 | `#7ccf92`, `#f0b44c`, `#f39a92`, `#8a8f98` (5.5:1) | sidebar runs, run state chip | +| Running | **no colour**: `--fpt-dim` spinner/pulse | same | running is not a call to action | + +The existing names `--fpt-status-running / waiting / done / failed / idle` map onto these: `running` becomes `--fpt-dim`. +`--pill-blue-*`, `--pill-lav-*`, `--pill-mint-*` remain defined for backward compatibility but are not used by new or simplified UI: +- "testing" uses neutral; +- "Written by the AI model" uses neutral with an icon; +- the engine labels use neutral. + +### 2.3 Environment cue (honesty) + +- **Practice environment** is the warning case: amber **text** with a shield icon, no fill, in exactly two places: + - the sidebar footer; + - the run top bar sub-line (and the readiness top bar when the rail hides the sidebar). + + Wording: "Practice environment: mock app, not Oracle Fusion". `data-testid="mock-banner"` stays on the sidebar one. The text "Mock + app, not Oracle Fusion" (case per `MOCK_TEXT`) must remain visible on every page. +- **Oracle Fusion pod** is the normal case: neutral text with a cloud icon, "Oracle Fusion pod: ". It is not blue. A test pod is + real but still a test; the neutral styling avoids implying "production". +- Report and screen footers keep their one-line honesty sentence in `--fpt-dim`. + +### 2.4 Shape, depth, type + +- **Radii:** 8px for inputs, buttons and small items; 12px for the few real containers (stage card, side panel sections, dialogs). Pills + are kept only for the status chip (999px). +- **Shadows:** none on cards. Use `--fpt-shadow-2` only on floating layers (menus, popovers, sticky bars) and `--fpt-shadow-3` on drawers. +- **Cards:** a block gets a border only if it must be separated from a neighbour of the same kind. Otherwise sections are separated by + 24px space and a sentence-case heading. +- **Type:** Poppins stays (brand continuity, no new dependency), with weights **400 and 600 only** (drop 500). + - Headings: 600, sentence case. + - No letter-spaced caps, no uppercase transforms anywhere. Remove `text-transform: uppercase` from `.fpt-tree-title`, + `.fpt-chat-phase`, `.fpt-stage-kicker`, the sidebar group headings, `.fpt-flow-you`, the board phase titles and the "NOT READY" + badge. + - The monospace face only for the run reference id. +- **Motion:** only the running spinner and the "Latest" jump. No hover lifts. + +--- + +## 3. Screen by screen: remove / merge / keep + +Notation: **Remove** (delete from the UI; the function remains reachable where noted), **Merge** (combine into one element), +**Keep** (stays, maybe restyled). "Primary" names the one accent button on the screen. + +### 3.1 Shell: sidebar and top bar + +| | | +|---|---| +| **Remove** | mint sidebar tint (use `--fpt-sidebar` grey); the "PT" black mark tile (show a 24px neutral outlined monogram); caps headings "RUNS", "NEEDS YOU", "RECENT"; amber "Review"/"Decide" badge **pills** in run rows; the red "Not ready" pill in run rows; the run-row sub-line's third part ("· Practice"); the filter icon button next to the Runs heading (move "Only mine" into a small "Show: All / Mine" text toggle at the bottom of the list); amber fill of the env switcher block; the black filled "New test run" button. | +| **Merge** | run-row right badge + dot become **one** status line: dot + word at the end of the sub-line ("18 Oct 23:52 · Needs your approval" with an amber dot; "Not ready" with a red dot; "Testing" with a grey pulse). Waiting rows also get the word in 600 weight. | +| **Keep** | New test run (secondary style: `default` button with a plus icon, full width; the screen's primary lives in the page); nav labels; the Test runs count (neutral grey number, amber only when > 0 runs wait for you); grouping order (waiting first, then running, then recent), with sentence-case headings "Waiting for you", "Running", "Recent"; env switcher as amber text + shield (2.3); kill indicator (red, it is an emergency); user row. Active nav item = `--fpt-selected` background + accent text and icon. | + +Top bar (run pages): + +| | | +|---|---| +| **Remove** | the "Finished" chip when a decision exists (the verdict says it); the uppercase red "NOT READY" filled badge; the env **pill** fill; "Quick simulation" (move into the run-type tooltip on the title, and into the panel Live tab text). | +| **Merge** | the status chip and the decision into one element: neutral chip with a dot and a word. "Waiting for you" (amber dot), "Testing" (grey pulse), "Ready" (green dot, green word), "Not ready" (red dot, red word), "On hold" (amber), "Paused" (amber), "Stopped" (red), "Cancelled" (grey). `data-testid="decision-badge"` and `data-rule` move onto this chip when decided (render it through `DecisionBadge` so unit tests still find it); `StatusBadge`'s test id stays on it otherwise. The chip's text content must be exactly the verdict words ("Not ready"): the dot is `aria-hidden`, because e2e asserts `toHaveText('Not ready')` on the first `decision-badge`. | +| **Keep** | title; second line = env cue text (2.3) + `ref` (neutral, monospace); All details; Resume (primary when shown); panel toggle; glossary. | + +### 3.2 Run workspace (conversation) + +| | | +|---|---| +| **Remove** | caps phase separators ("YOUR APPROVAL", "TESTING", "RESULT") → sentence-case dim text "Your approval" with the hairline; caps stage kicker "STAGE 2 OF 4 · APPROVE"; the coloured 4-segment bar (green/blue/amber); "AI" black avatar circles on every bot message (keep one small neutral avatar on the **first** bot message of each phase only); the "TEAM" caps label; the green check chip "4 done" colour; the amber left border on stage cards except approve/judge; black user bubbles (use `--fpt-surface-2` with `--fpt-text`; right-aligned); "That is the whole process. What next?" bubble (its two actions move into the result card as text links). | +| **Merge** | stage kicker + progress into one dim line "Step 2 of 4: approve the scenarios" (the progress bar becomes 4 neutral segments, the current one accent, done ones `--fpt-text` at 40% opacity; no green/amber); the suggestion chips + composer mode toggle → keep the chips, they are the command help, but render them as plain text buttons. | +| **Keep** | the current stage card (`run-guide`, `data-stage`) as the only bordered card in the thread; **approve and judge cards keep the amber 3px left edge** (human approval prominent); the primary button inside the stage card is the screen's only accent button ("Approve all 79 and start testing", "Submit my decision", "Open the report and sign off"); Excel download as a `default` button; team strip as one neutral line of text with icons ("4 of 15 steps done. Approval is waiting for you." + link "Open the team board"). | + +Result card (stage 4): + +| | | +|---|---| +| **Remove** | the full red/green filled verdict band; the bullet "•" list with five facts; "Results come from…" sentence duplicated by the top bar cue (keep one: in the result card, dim). | +| **Merge** | verdict + sentence: a 22px 600 verdict word **in the status colour** ("Not ready" in red), followed by one sentence in `--fpt-text`. Facts become a 4-column inline summary without borders: "65 tested · 1 failing · 14 not run · 1 defect" (one middle-dot string is acceptable here because it is a single row of numbers; each number links where useful). | +| **Keep** | primary "Open the report and sign off"; secondary "Download the results (Excel)"; "See the screens" (browser runs only); `guide-result` test id on the verdict block. | + +### 3.3 Side panel + +| | | +|---|---| +| **Remove** | red dot on the Report tab label (use a neutral count/marker only when something is new: a 6px accent dot means "updated since you looked", not "bad"); the red filled "NOT READY" pill in the Report tab; the tinted Steps id pill on the tab. | +| **Merge** | Report tab: verdict word (status colour) + the one-line reason + a 2-column numbers list (already plain) + actions. Only one accent button: "Open the full report and sign off". "Download PDF", "Share", "Download the results (Excel)" are `default` buttons in one row. | +| **Keep** | tabs (active = accent underline); Live, Screens (with Failed filter count in neutral), Excel, Steps; honesty footers. | + +Check (from review): the Steps tab for `P2P-APR-001` stays on its loading skeleton in four screenshots taken across three reviews +(`step4/failures-detail`, `review2-fixes/steps-loading-skeleton`, `review3-fixes/judge-quicksim-stacked`, `review3-fixes/scenarios`). The +10-second error fallback never appears. **Must-fix:** verify the scenario lookup resolves when the run's scenario list is still loading, +or when the selected id is a pending gate item. Show the error line after 10 s as specified. + +### 3.4 Team board + +| | | +|---|---| +| **Remove** | coloured agent avatars (initials on mint/lav/blue/amber) → a neutral 24px initials circle (`--fpt-surface-2`, `--fpt-dim` text); coloured phase top borders (green/blue/red); the per-card "Done" green check line when the whole phase is done (the phase heading carries "Done"); caps phase titles "UNDERSTAND" → "1. Understand" sentence case (the numbering stays, it is a real sequence); "took 21 s · finished 01:07 · Built-in rules" triple meta → two lines: "Took 21 s" and the engine label; the "YOU" pill → the word "You" in 600 weight after the name. | +| **Merge** | Coordinator card counters + state sentence into one sentence: "All 15 steps finished in 2 min 28 s. AI on this run: none, built-in rules only." | +| **Keep** | state words and icons per card; colour **only** for: the waiting card (amber left edge + "Waiting for you"), a failed card (red left edge + "Stopped"), a paused card (amber). Done and not-started cards are neutral. Engine labels = what actually ran (unchanged rule, R2-M1). | + +### 3.5 Approvals (scenario review) + +| | | +|---|---| +| **Remove** | blue/lav tinted pills: "Written by the AI model" (→ neutral text with a sparkle-free `IconRobot` 14px, dim), "Critical" red pill and "High" amber pill (→ plain text "Critical" in 600 weight; priority is not a state to act on); green "dry run passed" pill (→ the dry-run sentence with a green check icon only, text neutral); the coloured left borders on AI cards (lav undecided, green approved) → neutral border, and the decision is shown by the pressed button; the dashed-underline "Read the scenarios" `Term` styling in the intro (keep the tooltip, drop the underline in body copy). | +| **Merge** | the intro paragraph + filter row: one line "79 scenarios to review. Approve them, or skip some for this patch." Then filters. The NextStep banner on this view is a single line (already done) with no colour fill: amber text only. | +| **Keep** | filter chips as neutral segmented buttons (active = accent outline); step groups with "Approve all N" as `default` buttons; the sticky bar; **primary = "Submit review"** (accent) and "Approve the remaining N" as `default`; one decision order (Approve, then Skip for this patch); all accessible names. | + +Must-fix found in `review3-fixes/scenarios-phone-*`: all 79 scenarios sit in one group named "Other". This happens when the gate's +pending list renders before the run's scenario list (stubs have no `step`). **Do not render groups until `useRunScenarios` has +loaded.** Show the skeleton instead. If a scenario truly has no step, label the group "No process step". Re-shoot `scenarios-phone-*` +after the fix: the developer's "data not loaded" explanation is the bug itself, not a capture accident. + +### 3.6 Failure decision (Judge card and Failures view) + +| | | +|---|---| +| **Remove** | the red-filled "What happened" box (→ neutral box with the label "What happened" and the value in `--pill-red-fg`); the "1 of 1" amber pill when there is only one failure; tinted "failed at: Requisition" / "failed" / "Critical" pills on the Failures view (→ one dim line "Failed at Requisition. Critical."). | +| **Keep** | amber left edge on the Judge card; three choices as radio cards with neutral borders, selected = accent border + accent radio; "suggested" as dim text; primary "Submit my decision" (or "Next"); screen column; "Show the steps". | + +### 3.7 Report and sign-off + +| | | +|---|---| +| **Remove** | the red NextStep banner on top of the report (the report's own verdict header says it); the red "NOT READY" filled pill; "no coverage" amber pills inside the table (→ the cell text "No scenario" in dim italic is enough; the gap is listed below); the green-filled sign-off confirmation (→ a line with a green check icon, neutral text); the amber/red "rule result: NO-GO" pill in Audit details (→ plain text "Rule result: NO-GO", it is audit data). | +| **Merge** | header: area name, verdict word (status colour), and one row of actions: **primary "Go to sign-off"** (scrolls to and focuses the sign-off form). It must not be named "Sign off this report": e2e clicks that exact name and two matches would fail. Once signed off, this button disappears, then `default` "Download PDF", "Share", "Downloads". | +| **Keep** | the results table (neutral, zebra off, header in `--fpt-surface-2`); open defects; not covered yet; sign-off form; audit details collapsed; iframe; all test ids. | + +### 3.8 Patch readiness + +This also rules on the lead's observation in `readiness-desktop-light.png`: the "0 Not ready" tile next to a sidebar run marked "Not +ready". + +**Ruling:** yes, consultants will read it as a contradiction. The tiles count each area's **newest** run, which is waiting for approval, +while the sidebar shows an older **finished** verdict. A consultant asks "is Procure-to-Pay ready or not?", and the screen gives two +answers. Fix: +- the verdict an area shows is always the **last finished** verdict; +- an in-progress run is a second, clearly-labelled line. + +| | | +|---|---| +| **Remove** | the five KPI tiles (coloured borders, big zeros); the mint "ORACLE UPDATE 26C" band and its caps label; the duplicate honesty pill inside the band (the top bar cue covers it); the caps "NEEDS YOU" and "BUSINESS AREAS" labels; the seven blue process chips' fills; "Show details and 12 more process areas" as a grey button (→ a text link). | +| **Merge** | release info into the page sub-title: "Patch 26C. Pod release 26C, checked 18 Oct 23:53." (plus "Next Oracle update: " only when the API provides it). "Needs you" + area cards become **one list of areas**; each area row says what it needs. | +| **Keep** | top bar env select, patch select, **primary "New test run"** (accessible name unchanged, inside `main`); area cards (one bordered card per area, no tint); "What this patch changes" collapsed (button name unchanged); glossary link. | + +Area card content (exact): + +``` +Procure-to-Pay Not ready <- last finished verdict, status colour +Last result 18 Oct 23:51, signed off by admin. 1 scenario failing in Requisition. +(!) A newer test run is waiting for your approval. [Open your review] <- amber icon + text, primary button +Requisition 6/7 → Sourcing (no scenario) → Purchase order 9/9 → Receiving 3/3 → ... <- neutral text chips; only failing steps red, gaps dim italic +[Open the test run] [Report] Show details +``` + +- **Verdict** = `decisions[area]` of the newest **completed** run for that area on the selected environment and patch. Source: + `useRuns` items filtered by `status === 'completed'`, `modules.includes(area)`, `pod_id`. That data is already loaded; no new + endpoint. If no finished run exists: "Not tested yet" in dim. +- **In-progress line** only when a newer run exists and is not finished. Wording by state: + - "A newer test run is waiting for your approval." + - "A newer test run is waiting for your decision on failures." + - "A newer test run is testing now." + + Only the two waiting states get amber; testing is neutral. +- `verdict-` test id stays on the verdict word. `summary-` stays on the "Last result…" line. e2e asserts `summary-P2P` contains `/scenario|Not tested yet/`, so that line always includes a scenario count ("1 scenario failing", "All 65 scenarios passed") or the words "Not tested yet". The readiness API's `verdict` + field (current-state verdict such as "Waiting for you") moves to the in-progress line. +- Primary button per card only when the area waits for you. Otherwise "Open the test run" is `default`. +- If more than one area waits for you, order them first. No separate "Needs you" box. + +### 3.9 Runs list + +| | | +|---|---| +| **Remove** | per-row pill clutter: date pill with calendar icon, lav "quick simulation" pill, tinted status pill, amber "your review" link pill, per-area decision badges in a row of chips; "Getting started" coloured check icons (→ neutral checks). | +| **Merge** | each row = two lines: line 1 = run name (link) + status (dot + word, as in the sidebar); line 2 (dim) = "Practice environment" or "Oracle Fusion pod: ", run type, started by. The row menu stays. Waiting rows get "Open your review" as a `default` button at the right. | +| **Keep** | quick filters as a neutral segmented control (active = accent); status select; pager; `run-row-`; row menu items. Primary = "New test run". | + +### 3.10 Sign-in, register, forgot, reset + +| | | +|---|---| +| **Remove** | the dark green gradient brand panel → a quiet `--fpt-surface-2` panel with the product name, one sentence and the three points in `--fpt-text` (icons neutral). The amber honesty banner above the form becomes amber text with a shield (2.3), still `data-testid="mock-banner"`. | +| **Keep** | split layout (collapses to the form on phone); labels and button names; primary = "Sign in" / "Create account" / "Send the reset link" / "Save the new password". | + +--- + +## 4. Rules for steps 6 and 7 screens + +Applies to Runs list (3.9), Scenarios library, Test environments, Settings, Defects, Reports, Scheduled runs: + +1. **Page anatomy:** + - the top bar title; + - an optional one-line dim description (only if the page needs explaining); + - the content; + - one primary action in the top bar (accent). + + No header bands and no KPI tiles. +2. **Lists and tables:** + - neutral rows with 1px dividers and no zebra stripes; + - a status column shown as dot + word, never a filled pill; + - text actions or `default` buttons at the row end; + - a "..." menu for the rest. +3. **Filters:** a neutral segmented control or selects. The active one has an accent outline. Counts are plain dim numbers. +4. **Scenarios library:** priority as plain text ("Critical"). Origin as dim text with an icon ("Library", "Written by the AI model"). The + verification note stays dim text. The selected row uses `--fpt-selected`. +5. **Test environments:** + - one card per environment, with neutral borders; + - the practice pod shows the amber honesty line (2.3); a Fusion pod shows its neutral "Oracle Fusion pod" line; + - connection state as dot + words ("Connected, checked 2 h ago" green dot; "Not checked yet" grey; "Connection failed" red dot + + reason); + - primary = "Add test environment" (aria-label "Add pod" kept); + - per-card actions "Test connection" and "Sign-in details" as `default` buttons. +6. **Settings:** + - vertical tabs with neutral styling; the active tab uses `--fpt-selected` + accent text; + - each tab has one primary (for example "Save local model"); + - Emergency stop is the only red area: "Engage kill switch" is the red filled button; nothing else on the page is red; + - the "What goes where" and "Which agent uses which model" tables are neutral. +7. **Defects:** the status as dot + word. "Open" is red only for defects that are open **and** confirmed real; everything else is + neutral. +8. **Reports:** the verdict word in status colour per row (it is the point of the page) and the environment as text. Nothing else is + coloured. +9. **Scheduled runs:** + - rows read as sentences ("Every day at 02:00 UTC. Procure-to-Pay, full browser run."); + - "Next run 18 Oct 07:30" in dim; + - the enable switch uses the accent when on; + - patch watch is a plain section with a heading, not a tinted card; + - primary = "New scheduled run". +10. **Empty states:** one sentence that says what to do and one button. No illustrations, no coloured icons. +11. **Wording:** sentence case everywhere, no caps eyebrows, no "→" appended to buttons, consistent verbs: + - "Approve" / "Approved"; + - "Sign off" / "Signed off"; + - "Start test run" in the dialog, and "Test run started" in the toast. + +--- + +## 5. Hard constraints (unchanged) + +- `UI-REDESIGN.md` section 9 (functionality preservation checklist) and section 10 (routes, test ids, accessible names) remain binding. + Visible text may get shorter, but every accessible name listed in section 10 stays exact (use `aria-label` where the visible label + shortens). +- Honesty: + - practice versus Oracle Fusion is always visible (2.3); + - engine labels state what actually ran on that run (UI-REVIEW-2 R2-M1); + - "Mock app, not Oracle Fusion" stays visible on every page with a practice pod. +- Human approval stays prominent. Waiting-for-you is the **only** amber call to action. It appears in the sidebar row, the top-bar chip + and the stage card's left edge plus primary button. +- Dark mode is a first-class target. Every token above has a dark value; check every screen in both themes. + +--- + +## 6. Review of step 5 and the review-3 fixes + +These were cut off earlier. Most step-5 findings are superseded by section 3; the remaining specific items are below. + +**Review-3 fixes (`bdd5b0e`):** +- **Accepted:** R3-S1 (designed-engine list honest), R3-S2 (local dry-run times), R3-S3 (one order), R3-S4 (no self-link, one-line + banner), R3-S5 (`judge-quicksim-stacked`: one dim line), R3-S6 (failed-agent plain sentence + Technical details). +- **Open must-fix:** the Steps tab stuck on its skeleton (3.3) and the scenarios grouped under "Other" (3.5). **Re-shoot + `scenarios-phone-*` after the fix.** + +**Step 5 (`d82d618`):** +- **M (must):** readiness verdict contradiction. Ruled in 3.8; implement the last-finished verdict + in-progress line. +- **S (should):** the report view repeats the verdict four times on one screen (top-bar badge, red NextStep banner, report header pill, + panel Report pill). After section 3.1 / 3.7 it appears twice: the top-bar chip and the report header. The panel's Report tab shows it + only when the panel is on another view. +- **S:** "Open the report" in `result-desktop-dark` (signed-off state) vs "Open the report and sign off". Keep one name per state: + "Open the report and sign off" before sign-off, "Open the report" after. The panel button follows the same rule (it still says "Open + the full report and sign-off" after sign-off). +- **S:** `report-desktop-light` table header "Not run" wraps onto two lines and "Changed by this patch" onto two. Use "Not run" with + `white-space: nowrap`, and shorten the last column to "In patch" (yes/no). The full words go in the header `title`. +- **N:** `readiness-phone-dark` shows the honesty cue three times: top bar pill, band pill, band sentence. Section 3.8 leaves one. + +**Accepted as not verified with real data (carry as open visual checks before release):** +- "Start a test run" on an untested area; +- the Screens "Failed n" count; +- the Judge card with a real screenshot; +- AI approval cards (fixtures only); +- "Next update" date (no API field; correctly hidden). + +--- + +## 7. Order of work for the developer + +1. **Tokens and Mantine theme (2.1-2.4):** + - the new palette; + - accent as the primary colour; + - remove the ink hacks; + - caps removed globally; + - weights 400/600. + + Screenshot all existing screens light/dark; nothing functional changes. +2. **Shell and run workspace (3.1-3.3).** +3. **Team board, approvals, failure decision (3.4-3.6)**, plus the two open must-fixes (Steps skeleton, "Other" group). +4. **Report and readiness (3.7-3.8)**, including the last-finished verdict. +5. **Runs list and auth (3.9-3.10).** +6. **Steps 6 and 7 screens, built directly in this style (section 4).** + +Acceptance for each: e2e and unit suites pass, and the same screenshot set at 1440x900, 1100x800 and 390x844, light and dark. The +reviewer checks each screen for: +- one accent button; +- no caps labels; +- no tinted bands or coloured tiles; +- colour only on states listed in 2.2; +- the honesty cue present. diff --git a/web/src/agents.test.ts b/web/src/agents.test.ts index b2abc78ab3462ca8a030e8dc5356839e002dfd8d..5759b7cb1a32764f9b5dba6b1d1ac1e30697566d 100644 --- a/web/src/agents.test.ts +++ b/web/src/agents.test.ts @@ -23,7 +23,7 @@ describe('engine on this run (honesty)', () => { it('sums the run up for the Coordinator', () => { expect(aiOnRun([])).toBe('AI on this run: none'); - expect(aiOnRun([call('synthesizer', 'stub')])).toBe('AI on this run: none (built-in rules only)'); - expect(aiOnRun([call('triage', 'local'), call('reporter', 'frontier'), call('x', 'stub')])).toBe('AI on this run: local model llava-phi3 · external model mistral-large (2 calls)'); + expect(aiOnRun([call('synthesizer', 'stub')])).toBe('AI on this run: none, built-in rules only.'); + expect(aiOnRun([call('triage', 'local'), call('reporter', 'frontier'), call('x', 'stub')])).toBe('AI on this run: local model llava-phi3 and external model mistral-large (2 calls).'); }); }); diff --git a/web/src/agents.ts b/web/src/agents.ts index c396195d35fd6e300ee776fdd9420ee3d894c7d2..a33b49e700b814e5c7babe154a1d5d216e4cb11d 100644 --- a/web/src/agents.ts +++ b/web/src/agents.ts @@ -122,7 +122,7 @@ export function aiOnRun(llmCalls: LlmCall[] | null | undefined): string { const calls = llmCalls ?? []; const local = calls.filter((c) => c.route === 'local'); const frontier = calls.filter((c) => c.route === 'frontier'); - if (!local.length && !frontier.length) return calls.length ? 'AI on this run: none (built-in rules only)' : 'AI on this run: none'; + if (!local.length && !frontier.length) return calls.length ? 'AI on this run: none, built-in rules only.' : 'AI on this run: none'; const parts = [local.length ? `local model ${mostUsed(local)?.model ?? ''}`.trim() : '', frontier.length ? `external model ${mostUsed(frontier)?.model ?? ''}`.trim() : ''].filter(Boolean); - return `AI on this run: ${parts.join(' · ')} (${callsWord(local.length + frontier.length)})`; + return `AI on this run: ${parts.join(' and ')} (${callsWord(local.length + frontier.length)}).`; } diff --git a/web/src/chat/ChatCards.tsx b/web/src/chat/ChatCards.tsx index 8b3ae6c858634616ca0255e7f8769737f42040fc..a77df411c7d438309f7a4030ace856d46d614cfb 100644 --- a/web/src/chat/ChatCards.tsx +++ b/web/src/chat/ChatCards.tsx @@ -199,7 +199,7 @@ export function ConfirmCard({ action, onChange }: { action: ChatAction; onChange )} {error && {error}} - + {action.review && } diff --git a/web/src/chat/ChatDock.tsx b/web/src/chat/ChatDock.tsx index 4ea47b5ca1b69f5db89ec100a1a6d7a2012c5f91..f34bbbad2ea853d5c152daa576ac8a1380cc4f7b 100644 --- a/web/src/chat/ChatDock.tsx +++ b/web/src/chat/ChatDock.tsx @@ -178,7 +178,7 @@ function ChatPanel({ dock, onClose }: { dock: ChatDockState; onClose: () => void