Skip to content

fix(portal): ignore prose in snip Seen-on values#101

Merged
KB-x merged 1 commit into
mainfrom
fix/portal-seen-on-prose-tokens
May 24, 2026
Merged

fix(portal): ignore prose in snip Seen-on values#101
KB-x merged 1 commit into
mainfrom
fix/portal-seen-on-prose-tokens

Conversation

@KB-x
Copy link
Copy Markdown
Collaborator

@KB-x KB-x commented May 24, 2026

Why

Some snip headers use prose to indicate that a snip doesn't apply to one OS, e.g. Junos: (none in this JVD — Junos PEs use ...) or Junos: —. The parser was splitting the value on whitespace and turning every word into a device chip, producing nonsense like in this in this next to the real device tokens in the Snip Library UI.

What

  • portal/scripts/generate-snips.mjs — when parsing Seen on: values, stop at the first (...) continuation note and skip tokens that don't start with an alphanumeric character.
  • portal/src/data/snips.json — regenerated; device chips now show only real device names.

Expected impact

  • Snip Library detail panes display clean Seen on device lists.
  • No content changes to the underlying snip files were required.

Source-of-truth

snips.json is generated. Regenerated via node portal/scripts/generate-snips.mjs; CI --check will validate freshness.

Test

  • Ran the generator locally — 320 snips, 0 warnings.
  • Verified 0 prose tokens remain in any seenOn.junos / seenOn.evo array.
  • Spot-checked enterprise_wan/ewan_adv_core_edge/.../evpn-vpws-fxc.conf (the originally reported snip) — chips now show only the four real devices.

@KB-x KB-x self-assigned this May 24, 2026
@KB-x KB-x merged commit 0469a25 into main May 24, 2026
3 checks passed
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