Skip to content

✨ feat(glossary): expose exactMatch on glossary types - #72

Merged
elisiondan merged 1 commit into
mainfrom
feat/glossary-exact-match
Aug 1, 2026
Merged

✨ feat(glossary): expose exactMatch on glossary types#72
elisiondan merged 1 commit into
mainfrom
feat/glossary-exact-match

Conversation

@elisiondan

Copy link
Copy Markdown
Member

What

Adds the exactMatch field to the glossary types, which the public API returns and accepts but the client didn't expose:

  • GlossaryRecord.exactMatch: booleanrequired (always present in responses)
  • GlossaryCreateRequest.exactMatch?: boolean / GlossaryUpdateRequest.exactMatch?: booleanoptional (the public API defaults it to true when omitted)

Purely additive — no runtime change, no breaking change (ships as a minor).

Why

Tracked in the in-context-editor's external-items-and-missing-endpoints.md §10. Verified against the backend source of truth (server-backend/server-publicapiPubApiGlossary), which carries exactMatch: Boolean = true.

Note on lang (intentionally unchanged)

§10 also claimed GlossaryRecordTerm.lang should be a numeric langId. That's wrong for this client and was not applied. This client targets the public API (api.localazy.comserver-publicapi/PubApiGlossary), where term.lang is a String (locale code) — matching the current typing and the public docs. The numeric shape belongs to the internal app API (server-api/Glossary) that product-spa consumes. Changing lang to a number here would break the client against the real payload. The plugin doc has been corrected separately.

Tests

  • api.glossary.list now asserts exactMatch is read back
  • api.glossary.update covers the provided-on-write serialization path
  • Full suite green (pnpm run check): format, lint, typecheck, build, test

🤖 Generated with Claude Code

## Features
- Add `exactMatch` to `GlossaryRecord` (required) and to
  `GlossaryCreateRequest` / `GlossaryUpdateRequest` (optional; the public
  API defaults it to `true` when omitted)

## Tests
- Assert `exactMatch` is read back in `api.glossary.list`
- Cover the provided-on-write path in `api.glossary.update`

The public glossary endpoint (server-publicapi / PubApiGlossary) always
returns exactMatch and accepts it on write; the client was missing it.
`lang` is intentionally left as a locale string — that matches the
public payload (the numeric langId belongs to the internal API).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.07% 286 / 304
🔵 Statements 93.91% 293 / 312
🔵 Functions 94.73% 72 / 76
🔵 Branches 72.72% 64 / 88
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/types/glossary-create-request.ts 0% 0% 0% 0%
src/types/glossary-record.ts 0% 0% 0% 0%
src/types/glossary-update-request.ts 0% 0% 0% 0%
tests/fixtures/full-project/glossary.json 100% 100% 100% 100%
Generated in workflow #107 for commit 6814841 by the Vitest Coverage Report Action

@elisiondan
elisiondan merged commit 1395bc0 into main Aug 1, 2026
3 checks passed
@elisiondan
elisiondan deleted the feat/glossary-exact-match branch August 1, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants