Skip to content

chore: add additional field#99

Merged
DaxServer merged 1 commit into
mainfrom
chore/add-field
Jun 21, 2026
Merged

chore: add additional field#99
DaxServer merged 1 commit into
mainfrom
chore/add-field

Conversation

@DaxServer

Copy link
Copy Markdown
Owner

@greptile-apps

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

Safe to merge — the change appends one static field to the wikitext template string; no logic, data flow, or API calls are affected.

The edit is a single-line addition to a template literal. The wikitext syntax is correct, no existing tests are broken, and the rationale is documented in the referenced Commons discussion. The only gap is that no test verifies the new field is present, so a future regression there would go undetected.

frontend/src/composables/tests/useCommons.test.ts — the buildWikitext suite could use a new case asserting the other_fields line is in the output.

Important Files Changed

Filename Overview
frontend/src/composables/useCommons.ts Adds a hardcoded other_fields entry to the {{Information}} wikitext template, labelled "Academic context", per a Wikimedia Commons community request. Whitespace in adjacent fields adjusted for alignment. No existing tests fail, but there is no test asserting the new field appears in the output.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[buildWikitext called] --> B[Compute dateTemplate\nfrom store.globalDateCategory]
    B --> C[Compute sourceLink\nMapillary key + sequence ID]
    C --> D[Build Location template\noptional heading + Pano360]
    D --> E[Compose Information block\ndate / source / other_fields added in this PR]
    E --> F[Append license section\nitem → global → default cc-by-sa-4.0]
    F --> G[Append categories\nwith Curator tracking category]
    G --> H[Return wikitext string]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[buildWikitext called] --> B[Compute dateTemplate\nfrom store.globalDateCategory]
    B --> C[Compute sourceLink\nMapillary key + sequence ID]
    C --> D[Build Location template\noptional heading + Pano360]
    D --> E[Compose Information block\ndate / source / other_fields added in this PR]
    E --> F[Append license section\nitem → global → default cc-by-sa-4.0]
    F --> G[Append categories\nwith Curator tracking category]
    G --> H[Return wikitext string]
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "chore: add additional field" | Re-trigger Greptile

| source = ${source}
| date = ${dateTemplate}
| source = ${source}
| other_fields = {{information field|Academic context|{{en|1=Geospatial street-level imagery from external site}}}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing test coverage for the new other_fields line

The buildWikitext describe block has thorough tests for license, heading, pano, and coordinates, but none assert that other_fields is present in the output. If the template line is accidentally dropped or mis-formatted in a future edit, no test will catch it — the existing assertions all use .toContain() on unrelated substrings and will keep passing regardless.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

@DaxServer DaxServer merged commit 3426c97 into main Jun 21, 2026
5 checks passed
@DaxServer DaxServer deleted the chore/add-field branch June 21, 2026 11:09
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.

1 participant