Draft
Conversation
Contributor
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
…n parent and subfeature
18ba405 to
d3215c5
Compare
caugner
commented
Mar 17, 2026
The Notification does not have the `SecureContext` annotation, but the required secure context is implied by the powerful feature.
Contributor
|
This pull request has merge conflicts that must be resolved before it can be merged. |
Build an index at startup mapping each BCD feature segment name (e.g. `addEventListener`) to the spec URLs already used by other features with that same name, sorted by frequency. Show the top 5 as numbered suggestions during the prompt; the user can accept one by typing its number. Each assigned URL is also fed back into the index so later features with the same segment benefit from URLs chosen earlier in the session.
Add an `x` command that posts the current feature's last path segment to the respec xref API and appends any new results to the numbered suggestion list. For Web API features the parent segment is sent as the `for` context; if there's an ancestor spec_url, the matching spec shortname (derived via the xref meta endpoint) is used to filter results to the relevant spec.
`x <term>` (e.g. `x background-sync`) searches the respec xref API for the given term across all specs, bypassing the automatic for/spec filters. Plain `x` still uses the feature's last segment with context filters as before.
The xref API returns result[0] as [cacheHash, matchesArray], not a flat array of matches, and uri is a fragment only (e.g. #dom-foo). Fix by reading result[0][1] for matches and combining each match's uri with the spec base URL looked up from the meta map (now keyed shortname → url). Also simplify guessSpecShortname to iterate the map directly.
xref returns uri as a relative path without a leading slash (e.g. "text-level-semantics.html#the-time-element"). Use new URL(uri, base + "/") so the path resolves correctly against the spec base URL instead of being concatenated directly.
Combines the ancestor's spec_url(s) with one or more extra URLs into an array set on the current subfeature only, without touching the parent. Useful when a subfeature is covered by the parent spec plus an additional spec URL.
`r` re-submits the previous answer, useful for applying the same spec URL or action to a run of consecutive features. The last input is updated after every successful action (f, p, p,, p=, number, URL) but not after skips, undo, or the repeat itself.
The segment-name suggestion index now stores {url, count} pairs instead
of bare URLs. The count (number of BCD features with that same segment
name using that spec URL) is shown next to each suggestion as ×N when
N > 1, so low-confidence single-occurrence hits are visually distinct
from well-established matches.
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.
Summary
Fixes standard-track exceptions.
Test results and supporting details
Includes a helper script
node scripts/fix-standard-track-exceptions.jsthat allows to fix them interactively.Related issues
Follow-up of #28810.