Commit graph

5 commits

Author SHA1 Message Date
Marco Beretta
3d240e2b8a
🧪 fix: Close css-colors Triplet and Disabled-Recipe Rule Gaps (#17358)
* fix: Close Gaps in the css-colors Triplet Check and the Disabled-Recipe Rule

The triplet check now reads angle channels, and the disabled-recipe rule accepts spelled recipes under the same or fewer enclosing variants, resolves cva and constant class strings, and handles spread strings, per-dim primitive coverage and implied selectors.

* fix: Read Recipe Markers Anywhere in the Variant Stack and Keep Object Spreads

* test: Cover Spelled-Out Disabled Recipes in the Design Lint Scenario

* fix: Keep Stateful Arbitrary Disabled Selectors Unrestored and Order Arbitrary Enclosing Variants

* fix: Order Enclosing Variants Whenever an Arbitrary Selector Is Present

* fix: Pin the Disabled Marker Position When Arbitrary Variants Enclose a Dim

* fix: Order Child Selector Variants Like Arbitrary Ones

* fix: Skip Unplaced Disabled Variants and Read Math Functions by Token

The disabled-recipe rule now skips utilities under arbitrary variants it cannot place instead of guessing how a recipe orders against them, and unwraps TypeScript assertions on spread and class-map recipes. css-colors classifies any innermost math function by its tokens, so rounding strategies and constants no longer hide an angle-led triplet.

* fix: Read Any Fixed Math Function as a css-colors Channel

A math function over numbers and angles is a fixed channel in any position, so unit cancellation (calc(90deg / 1deg)) needs no unit algebra, and trigonometric functions and sign are fixed whatever their arguments (atan2(1px, 1px), sign(90deg)).

* fix: Unwrap Constant Class Strings and Honor Class-Map Overrides

A const initializer under as const or satisfies is read like a plain string, and a class-map recipe entry no longer counts when a later spread or the same key can overwrite it.

* fix: Keep Angle Math Results and Disjoint Spreads Out of Overrides

An angle-valued math result stays an angle, so it reads only as a leading hue, and a later object-literal spread invalidates a class-map recipe only when it sets the same key.

* fix: Place Valued data-disabled Self Selectors in disabled-recipe
2026-10-24 15:09:30 +02:00
Marco Beretta
c00c776e0e
📦 feat: Scaffold the @librechat/chat Package (#16964)
* feat: Scaffold the @librechat/chat package

Adds packages/chat with core, react and components entries, a tsdown build,
a node-environment jest config, turbo and root build wiring, import boundary
rules, design-lint scope, and core types for the chat transport, stream,
host and status. No code moves yet.

* test: Cover the @librechat/chat boundaries as scenarios

* fix: Run the chat suite in test:turbo and build it for the mock lane

test:turbo now selects @librechat/chat, the mock e2e job builds the package the
chat-package scenarios load, and the synthetic repository in the suppression
scenarios carries the packages/chat/src root lint:design:record names.

* chore: Build the chat package in frontend:ci too

* chore: Run the chat suite in test:all

* fix: Hold core TSX to the chat boundary and scan the package for cycles

* fix: Apply the chat import boundary to JavaScript sources

* fix: Keep nested core files off the components entry

* fix: Close the remaining chat package gates and fence aborts by generation

Blocks imports through the @librechat/frontend workspace name, adds the chat
sources to the i18n scan, the CSS color gate and the client Tailwind content,
and lets ChatAbortRequest carry the generation it means to stop.

* fix: Keep JSX out of the chat core and carry abort and reconnect outcomes

Rejects JSX under the core, copies the chat manifest before the Docker
install, keys the client app build caches on the chat sources, fences
reconnects by generation, and types the abort result the transport returns.

* test: Give the CSS gate's scratch tree the chat root it now scans

* fix: Close the remaining @librechat/chat gates and wiring

Rejects import() and require() across the package boundaries, holds chat
components to the literal-copy rule, compiles TSX in the package's jest
transform, builds the package in Frontend Unit Tests, requires its test job for
main promotion, adds it to the unused-dependency scan, and lists it wherever a
sibling workspace is listed: Dockerfile.multi, the docker smoke paths, the
remaining node_modules caches, the reinstall helper, the bun build chain and
AGENTS.md.

* fix: Tighten the chat boundaries and carry steering and Assistants aborts

Template-literal import() and require() and self-imports through the package
name are rejected, user-facing JSX attributes need localized text, the cycle
scan resolves self-imports, Dockerfile.multi builds the package for the client
stage, and the transport carries steer, cancelSteer, armSteer and the
Assistants abort key.

* feat: Match the chat transport and host contracts to the client's

The transport now reports settled and replaced starts, the stream's protocol
version and resumed flag, reconnect replay, generation status, paused-run
resume with approvals or answers, abort and steer protocol versions, and the
request error shape. The host config and auth carry what the client's
ChatSettings now supplies: rename-while-running, model specs, retention mode
and the user.

* fix: Keep lazy React-entry loads out of the core and type the Assistants stop

Relative import() and require() of the /react entry from core are rejected,
and an abortKey stop resolves to the terminal conversation and run messages the
Assistants route returns.

* fix: Fence start controls by protocol and close extension-bearing entry loads

Settled and replaced start results carry the protocol version, core loads of
the /react or /components entry with a file extension are rejected, and
test:packages:chat builds data-provider first.
2026-10-10 21:00:10 +02:00
Marco Beretta
6c8f659d54
🧮 fix: Read Math Function Channels in CSS Custom Property Triplets (#16924)
* fix: Read Math Function Channels in CSS Custom Property Triplets

* fix: Collapse Nested Numeric Math Before the Triplet Check

* fix: Read Exponents and Math Constants in Triplet Channels

* fix: Read round() Strategies in Triplet Math Channels
2026-10-09 18:39:30 +02:00
Marco Beretta
945a885394
🎚️ feat: Promote Stylesheet Colour Roles to Registry Colours (#16864) 2026-10-08 13:22:23 +02:00
Marco Beretta
3ca084a6cf
🎨 refactor: Route Stylesheet Colours Through Theme Variables (#16823)
* refactor: Route Stylesheet Colours Through Theme Variables and Gate CSS Literals

* fix: Run the Colour Check Through Its Own Script

* fix: Read Numeric Fallbacks Inside Colour Function var() in the Colour Literal Check
2026-10-07 16:02:41 +02:00