fix(ci): the second round of gates after the places changes

- index.css stays at its size: the map canvas colour moves to its own
  stylesheet.
- The rating badge on map markers takes its amber and white from a class in
  ratingBadge.css instead of inline literals; the theme entry drops with it.
- Strict mode: the identity a link joins is resolved without a widened union,
  the description of an entry's origins is string or undefined, and the map
  search rows are typed.
- knip: PLACE_NAME_ATTR is module private, the linked-by enum names the values
  the service writes, and the unlink contract is its own described schema
  rather than a second name for the use schema.
- The duplicates hook test reads toasts through a module mock instead of the
  window hook; react-hooks/refs is lowered to the count the run measured.
- Tests follow the rename to Places and the list icon on an edit.
This commit is contained in:
Maurice
2026-11-29 16:38:53 +01:00
parent bacc6a29a7
commit f99c7f5421
17 changed files with 51 additions and 37 deletions
@@ -1,4 +1,4 @@
import { UserPlaceLinks } from '../../db/entities/UserPlaceLinks.entity';
import { UserPlaceLinks, UserPlaceLinksLinkedBy } from '../../db/entities/UserPlaceLinks.entity';
import { UserPlaceMergeDismissals } from '../../db/entities/UserPlaceMergeDismissals.entity';
import { UserPlaceMerges } from '../../db/entities/UserPlaceMerges.entity';
import { UserPlaces } from '../../db/entities/UserPlaces.entity';
@@ -93,11 +93,11 @@ export class PlaceIdentitiesService {
}
const first = uses[0];
if (!first) throw placeNotFound();
const target =
request.identity_id === undefined ? { facts: await this.factsOfUse(reach, first) } : { id: request.identity_id };
const joining = request.identity_id;
const identityId = await this.uow.transactional(async () => {
const id = 'id' in target ? target.id : await this.identities.createOwn(user.id, target.facts);
await this.attach(user.id, id, uses, 'user');
const id =
joining !== undefined ? joining : await this.identities.createOwn(user.id, await this.factsOfUse(reach, first));
await this.attach(user.id, id, uses, UserPlaceLinksLinkedBy.USER);
await this.identities.touch(user.id, id);
await this.prune(user.id);
return id;
@@ -288,7 +288,7 @@ export class PlaceIdentitiesService {
google_ftid: first.google_ftid,
osm_id: first.osm_id,
});
await this.attach(userId, id, usesOfRows(rows), 'merge');
await this.attach(userId, id, usesOfRows(rows), UserPlaceLinksLinkedBy.MERGE);
return id;
}