fix(frontend): canonical Apache project names + sync target audience (#14)#40
Open
milamberspace wants to merge 1 commit into
Open
fix(frontend): canonical Apache project names + sync target audience (#14)#40milamberspace wants to merge 1 commit into
milamberspace wants to merge 1 commit into
Conversation
…ache#14) The new-question form showed the lowercase project id ("jmeter") in the picker and in the target-audience default ("Apache jmeter community"), and changing the project left a stale audience. - Bundle src/lib/apache-projects.json: an id -> "Apache Name" map of every ASF top-level project (373 entries), generated from the authoritative projects.apache.org feed by scripts/gen-apache-projects.mjs. This is the only way to get canonical casing (JMeter, CloudStack, CouchDB) that a lowercase id can't express. - Add src/lib/projects.ts: synchronous lookup (bundled map), with a lazy one-shot live fetch of the same feed for ids missing from the bundle, and a capitalize heuristic as the final offline fallback. - ProjectPicker renders the canonical name (value stays the id). - Target audience follows the selected project while it holds the auto-generated default, and is left untouched once edited by hand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015qQoQHpb4kR81SSzc8y6Dv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14.
The new-question form showed the lowercase project id (
jmeter) in the picker and in the target-audience default (Apache jmeter community), and changing the selected project left a stale target audience behind.Canonical casing like JMeter, CloudStack, CouchDB cannot be recovered from the lowercase id alone, so this bundles the authoritative names published by
projects.apache.org:src/lib/apache-projects.json— anid -> "Apache Name"map of all 373 ASF top-level projects, generated from the official feed byscripts/gen-apache-projects.mjs(re-runnable when the project list changes).src/lib/projects.ts— synchronous lookup against the bundled map, with a lazy one-shot live fetch of the same feed for any id missing from the bundle (the feed servesAccess-Control-Allow-Origin: *), and a capitalize-each-word heuristic as the final offline fallback.ProjectPickernow renders the canonical name; the optionvaluestays the project id sent asproject_id.npm run checkpasses (0 errors, 0 warnings) andnpm run buildsucceeds.dist/is left for CI to regenerate.🤖 Generated with Claude Code