Settings: Privacy is one compact paragraph

This commit is contained in:
Niko1221 committed 2026-11-01 12:38:13 +01:00
1 parent 87610346d6
commit 63ae1eb3cd
3 files changed
+30 -12

No files matched your search

+3 -10
View File
@@ -1,17 +1,10 @@
import { tr } from '../lib/i18n';
const NOTES = [
'Strata sends no usage telemetry.',
'Conversations stay in browser storage.',
'When you choose an API model, that conversation and enabled skill instructions are sent to its provider.',
'The UI request log keeps client, timing and token metadata in memory.',
'Native API monitoring can retain request content in memory when enabled.',
'Connected tools access the resources you configure.',
];
/** What Strata collects and where things go: one compact paragraph (the six sentences read together, translated as one in every language). */
const NOTES = 'Strata sends no usage telemetry. Conversations stay in browser storage. When you choose an API model, that conversation and enabled skill instructions are sent to its provider. The UI request log keeps client, timing and token metadata in memory. Native API monitoring can retain request content in memory when enabled. Connected tools access the resources you configure.';
/** What Strata collects and where things go: plain lines of text, nothing else. */
export function PrivacyNotes() {
return <div className="privacy-notes" aria-label={tr("Collection and logs")}>
{NOTES.map(text => <p key={text}>{tr(text)}</p>)}
<p>{tr(NOTES)}</p>
</div>;
}
+2 -2
View File
@@ -7253,8 +7253,8 @@ textarea {
.storage-model__size { font-variant-numeric: tabular-nums; font-size: var(--st-fs-sm); }
/* ---- About > Privacy: plain text ---- */
.privacy-notes { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }
.privacy-notes p { margin: 0; font-size: var(--st-fs-sm); line-height: 1.5; color: var(--st-ink-soft); }
.privacy-notes { padding: 2px 0; }
.privacy-notes p { margin: 0; max-width: 68ch; font-size: var(--st-fs-sm); line-height: 1.6; color: var(--st-ink-soft); }
/* ---- an opened task: the name, and a last answer that is easy to read ---- */
.task-name { margin: 0 0 2px; font-size: var(--st-fs-xl); letter-spacing: -.02em; }
@@ -0,0 +1,25 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {resolve} from 'node:path';
const root = resolve(import.meta.dirname, '..');
const source = readFileSync(resolve(root, 'src/components/PrivacyNotes.tsx'), 'utf8');
const SENTENCES = ['Strata sends no usage telemetry.', 'Conversations stay in browser storage.', 'When you choose an API model, that conversation and enabled skill instructions are sent to its provider.', 'The UI request log keeps client, timing and token metadata in memory.', 'Native API monitoring can retain request content in memory when enabled.', 'Connected tools access the resources you configure.'];
test('Privacy is one compact paragraph with all six sentences, in order', () => {
const text = source.match(/const NOTES = '([^']*)';/)?.[1];
assert.equal(text, SENTENCES.join(' '));
assert.equal((source.match(/<p>/g) ?? []).length, 1, 'one paragraph, not a line per sentence');
});
test('the paragraph is translated as a whole in all 9 languages', () => {
const joined = SENTENCES.join(' ');
const en = JSON.parse(readFileSync(resolve(root, 'src/locales/en.json'), 'utf8'));
const id = Object.keys(en).find(k => en[k] === joined);
assert.ok(id, 'the English catalog has the whole paragraph');
for (const lang of ['zh', 'ja', 'de', 'es', 'ru', 'pt', 'ko', 'fr']) {
const cat = JSON.parse(readFileSync(resolve(root, `src/locales/${lang}.json`), 'utf8'));
assert.ok(cat[id] && cat[id] !== joined && cat[id].length > 80, `${lang} has its own translation of the paragraph`);
}
});