Repository navigation
Description
Bug: a project key suggested from an accented name splits words at the accents ("Société Générale" → STG)
P3. Locally reproduced at current main 4e3c8e40fe05706a5e8796bb30b024b58c1038f9 by the TALE-223 coordinator, with an independent read-only review.
Reproduction and result
deriveProjectKey (packages/shared/src/utils/project-key.ts:35-55) builds the suggested task-identifier key from a project's name. It treats every accented letter as a word break:
| Project name | Key on main | Expected |
|---|---|---|
Societe Generale |
SG |
SG (control) |
Société Générale |
STG (words read as Soci, t, G, n, rale) |
SG |
Projet Sécurité |
PSC (derived from source; the probe stopped at the previous assertion) |
PS |
The create dialog prefills this key (services/platform/app/features/projects/components/project-create-dialog.tsx:119). The server stores it with no review when a project is created without a key and when a project is duplicated (services/platform/backend/domains/projects/service.ts:544, :562). The guides say a project key cannot change after creation (docs/en/platform/projects/concepts.md:28). Such a project keeps that prefix permanently when the suggestion is accepted, and always when the server derives the key (create without a key, duplicate).
Root
project-key.ts:41-45 splits the name on /[^A-Za-z0-9]+/, so é, ü, à and every other non-ASCII letter end a word. The JSDoc promises "initials of the first words when the name is multi-word". The project service's own comment (service.ts:521-526) treats only names with "no Latin letters or digits" as keyless, and é is a Latin letter.
Evidence and controls
The probe below ran in an admitted, bounded check under Node vitest (packages/shared config, one worker, pure function). The control (Societe Generale → SG) passes. The accented name fails with STG.
Probe (uncommitted test in packages/shared/src/utils/)
import { describe, expect, it } from 'vitest';
import { deriveProjectKey } from './project-key';
describe('deriveProjectKey with accented letters inside words', () => {
it('takes one initial per word, as for the same name without accents', () => {
expect(deriveProjectKey('Societe Generale')).toBe('SG');
expect(deriveProjectKey('Soci\u00e9t\u00e9 G\u00e9n\u00e9rale')).toBe('SG');
expect(deriveProjectKey('Projet S\u00e9curit\u00e9')).toBe('PS');
});
});Deduplication and acceptance
All 1,385 issues were searched for deriveProjectKey, project keys, initials, accents and diacritics. No issue covers this.
Acceptance: split words on Unicode letter boundaries, or fold diacritics before splitting (for example NFD and drop combining marks), so that accented names yield one initial per word. Single-word names keep their leading letters. The existing project-key.test.ts cases (TP, QSH, OTT, TAL, QA, '' for !!!) stay green.
Limits: pure function. No project was created through the app or REST in this run.
Activity
fix(shared): stop splitting project key words at accented letters
fix(shared): stop splitting project key words at accented letters