Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to scolta-python are documented here.
- **`AutoProvisioner.ensure_ai_available()` no longer provisions anything, and its return value is always `False`.** It previously returned `True` when it had minted a fresh trial. There is no longer a success to report. The parameter list is unchanged, so callers keep compiling; a caller that branched on `True` should move that branch to its own explicit `provision()` call. Two tests that asserted the mint behaviour are replaced by tests asserting its absence.

### Fixed
- **Prompt templates re-synced from scolta-core: the `expand_query` decomposition preference and rule 13 (`src/scolta/ai/prompts.py`).** Rule 13 is now `CATEGORY → INSTANCES` rather than `CATEGORY → MEMBERS`, and it no longer presupposes a closed set. It previously licensed decomposition only when the model could "name the members confidently", so open-ended groupings — regulations, platforms, regional cuisines — fell back to restating the category, and only closed canonical sets decomposed at all. It now states that a grouping needs no complete or canonical membership and that the several most prominent instances are a decomposition, and it forbids substituting a narrower grouping for the one asked about ("citrus fruits" → "tart fruits"), which is only the same query restated. The two category→sub-category examples that taught that exact shape ("European cars" → "German cars", "Southeast Asian food" → "Thai") are gone. The task definition itself now names both kinds of expansion — an alternate PHRASING and a DECOMPOSITION — and says decomposition is the stronger one wherever it is available; the definition is what governs here, since edits confined to the rules moved nothing on their own. That preference defers explicitly to rule 15, without which the pressure to name instances overrode the unrecognized-entity guard and invented an identity for a mission it did not recognize. Rule 14 gains the same open-ended allowance, and the Examples block gains three worked decompositions ("citrus fruits", "camping trip essentials", "onboarding a new hire"). Byte-identity with scolta-core is enforced by `tests/ai/test_prompt_identity.py`.
- **Re-vendored the browser bundle (`src/scolta/assets/js/scolta.js`) from scolta-php: the AI summary's "Show more" control now follows the viewport width, and a summarize failure can no longer strand the loading skeleton**
([tag1consulting/scolta-php#269](https://github.com/tag1consulting/scolta-php/pull/269)).
Two follow-ups to the layout reservation. **First**, whether to clamp the summary and offer the control is a measurement (`scrollHeight` against `clientHeight`), and it ran only on resolve and on a toggle click, so the decision froze at the width the summary landed in. Rotate a phone to portrait, or shrink a responsive column, and a summary that fitted reflows past the reserved height: the text is still clipped, but with no clamped class there is no fade and the control stays hidden, so **a sighted reader saw text cut off at the box edge with no on-screen way to open it** (the full text stays in the DOM, so find-in-page and assistive tech were never affected). Widening left a pointless control behind. A feature-detected `ResizeObserver` on the text region now recomputes it, with exactly one live at a time, disconnected when the slot is released and when the user expands the summary, re-established on collapse, and never installed when the AI summary is off. The recompute toggles a mask class and the control's `hidden` flag inside the fixed-height panel, and the reserved height derives from a line count rather than the width, so **the box measures the same at every width** (297.03px at both 1280px and 420px) and the reveal moves nothing. **Second**, the search flow's un-awaited `summarizeResults(...)` call had nothing chained onto it; the work before its fetch is outside its own error handling, and because the function is `async` a throw there became a rejected promise the expansion chain's `.catch` never saw. With the slot reserved from the result paint, that left a skeleton shimmering permanently. The call now carries its own `.catch`, guarded on the search version so an abandoned cycle cannot collapse a newer search's slot. Nothing on the Python side changed and no index rebuild is needed. Copied byte-identically from the canonical `scolta-php` assets, verified with `cmp`.
Expand Down
Loading