Skip to content

fix(w3c/headers): derive /TR pubSpace for multi-group specs#5263

Merged
marcoscaceres merged 3 commits into
speced:mainfrom
marcoscaceres:fix/4688-latest-version-multi-group
May 5, 2026
Merged

fix(w3c/headers): derive /TR pubSpace for multi-group specs#5263
marcoscaceres merged 3 commits into
speced:mainfrom
marcoscaceres:fix/4688-latest-version-multi-group

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

Closes #4688

When group is an array (e.g., ["das", "webapps"]), conf.groupType becomes an array like ["wg", "wg"]. The strict equality check conf.groupType === "wg" always fails for arrays, so derivePubSpace returned undefined, producing an incorrect or empty latestVersion.

Now checks both string and array forms of groupType.

Visually verified in Safari with group: ["das", "webapps"], specStatus: "ED", shortName: "geolocation": "Latest published version" correctly shows https://www.w3.org/TR/geolocation/.

When `group` is an array (e.g., `["das", "webapps"]`), `conf.groupType`
becomes an array like `["wg", "wg"]`. The strict equality check
`conf.groupType === "wg"` always fails for arrays, so `derivePubSpace`
returned undefined, producing an incorrect `latestVersion`.

Now checks both string and array forms of `groupType`.

Closes speced#4688
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes incorrect W3C /TR/ publication-space derivation for multi-group specs, ensuring the “Latest published version” URL is generated correctly when groupType is an array.

Changes:

  • Update derivePubSpace() to treat conf.groupType as either a string or an array.
  • Determine “is working group” via groupType === "wg" or groupType.includes("wg") (when array), enabling /TR/ derivation for multi-group configs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/w3c/headers.js
Verifies that when group is an array (e.g., ["das", "webapps"]) with
specStatus "ED", the latestVersion correctly resolves to /TR/<shortName>/.

Address Copilot feedback.
@marcoscaceres
Copy link
Copy Markdown
Contributor Author

@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed?

1 similar comment
@marcoscaceres
Copy link
Copy Markdown
Contributor Author

@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed?

Comment thread src/w3c/headers.js
@marcoscaceres marcoscaceres marked this pull request as ready for review May 5, 2026 04:13
@marcoscaceres marcoscaceres requested a review from sidvishnoi May 5, 2026 04:13
@marcoscaceres marcoscaceres merged commit e1ff08f into speced:main May 5, 2026
8 checks passed
@marcoscaceres marcoscaceres deleted the fix/4688-latest-version-multi-group branch May 10, 2026 17:07
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.

"Latest published version" in editor's draft points to wrong place

4 participants