feat: ret datafølsomheds-kategorier og fejlbeskeder i delingsflowet - #224
Open
martinydeAI wants to merge 1 commit into
Open
feat: ret datafølsomheds-kategorier og fejlbeskeder i delingsflowet#224martinydeAI wants to merge 1 commit into
martinydeAI wants to merge 1 commit into
Conversation
Brugertest af delingsflowet pegede på to problemer. Datafølsomhed manglede en kategori til indhold helt uden personoplysninger, så curatorer med rent fagligt materiale ikke havde et ærligt valg — og den øverste mulighed forvirrede, fordi teksten ikke afgrænsede sig fra netop det tilfælde. Ny case NoPersonal lægges først, da rækkefølgen i enum'et styrer radiokortenes rækkefølge. Kolonnen er en nullable STRING(32) med enumType, så der kræves ingen migration. Teksten på "Almindelige personoplysninger" siger nu hvad den dækker (artikel 6) i stedet for at gentage sig selv, og en ny example()-metode giver alle fire kategorier en konkret eksempellinje. Fejlbeskederne ved en afvist konfiguration var uforståelige, fordi alle fem adaptere rapporterede hver for sig: en næsten gyldig OpenWebUI-fil fik også beskeden "A Modelfile must contain a FROM instruction." — uoversat, om et format brugeren aldrig havde valgt. Validatoren melder nu klart at filen blev afvist og nævner de accepterede formater. Feltet får desuden et eksempel på en gyldig konfiguration som placeholder. Hvad der er gyldigt, er uændret — kun rapporteringen. Refs #223 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Links to issues
Closes #223
Leantime tickets: 8211, 8219.
Description
Two problems user testing found in the share wizard.
8211 — data sensitivity. There was no option for material that holds no
personal data, so curators with purely factual sources had to overstate.
The topmost option also confused people because its copy was circular
("almindelige personoplysninger og ikke-følsomt indhold").
DataSensitivity::NoPersonal("Ingen personoplysninger"), declaredfirst so the scale runs least-sensitive downward.
identifying but neither confidential nor sensitive.
example()accessor adds a third line to all four cards namingconcrete documents, so the choice is made by recognition.
data_sensitivityis a nullableSTRING(32)withenumType.8219 — the paste field. First-time curators could not see what the field
expected, and a rejection told them things like
A Modelfile must contain a FROM instruction.ValidAssistantConfigValidatorno longer aggregates every adapter'sschema errors. It states the file was rejected and names the accepted
formats.
assistant_validation,which gains a Danish rendering of the Modelfile line for people who really
are pasting one.
What counts as valid is unchanged; only the reporting is.
Screenshot of the result
Not included — the wizard sits behind authentication and I could not drive
the stateless-CSRF login from the sandbox. The radio cards now carry three
lines each and the textarea has a multi-line placeholder, so a reviewer
should look at the actual step for spacing.
Checklist
Markdown lint could not be run locally:
itkdev/markdownlint's arm64 manifestentry contains x86-64 binaries, so the container exits with
exec format erroron aarch64. CI will cover it.
Details - AI specificities
Root cause of the unreadable errors.
ValidAssistantConfigValidatorlooped every registered adapter and raised one violation per error line. Since
only one format can be right, the other four always contributed noise — which
is why a near-valid OpenWebUI file got told about Ollama's
FROMinstruction.The registry still decides validity; the loop only ever shaped the message.
Test changes (both approved in advance, no assertion weakened or skipped):
DataSensitivityTest—testCasesReturnsAllThree→testCasesReturnsAllFour,new backing value pinned, new
testExampleBuildsTranslationKeys. A docblockrecords that declaration order is contract, not incidental: it drives the
radio-card order.
ValidAssistantConfigValidatorTest— the two violation-shape tests now assertthe exact statement + help pair rather than deriving expectations from the
adapter error list. Asserting the exact pair is deliberate: it fails if the
per-adapter dump is ever reintroduced. The passthrough translator stub is gone
with the validator's translator dependency.
Colour choice. The new case maps to info (blue) on the detail-page pill
rather than green. Green already means "handled ordinary personal data
correctly", and collapsing both onto it would lose that step.
Known remaining gap. Opis JSON-schema errors still surface in English on
the live check endpoint — they carry interpolated
{property}/{path}context,so a keyword-level mapping would need revisiting on every library bump. Out of
scope here; the fixed adapter strings are translated.
Verification.
task test— 691 tests, 2041 assertions, green (up one fromthe new enum test).
task test-coverageis 100% oncesrc/DataFixtures/LocalUserFixtures.phpis excluded; that file is gitignoredand untracked, so it does not exist in CI. PHP CS Fixer, Twig CS Fixer, and
Prettier on the three changed YAML files all pass.
bin/console lint:yaml translationsis clean anddebug:translation dashows all twelveassistant.data_sensitivity.*keys defined with none missing.Non-goals. The remaining Form-adjacent asks from the same round are not
here: a written guide to the export format (part of 8219's original wording)
would be a docs page, not a form change.