fix: bookmark {dest_type} shows destination class; add {leads_to} token#484
Merged
Conversation
{dest_type} resolved to whLeadsTo || wh.dest, so a hole pinned to a
specific system showed that system (e.g. J110555) instead of a class —
despite being labelled 'Destination class'.
- {dest_type} is now the destination CLASS via whDestClass (the type's
charted dest, e.g. D364 -> C2), falling back to the leads-to only when
it's itself a class/band (a K162 tagged 'C4'), never a pinned system.
- New {leads_to} token carries the raw leads-to: a pinned system
(J110555) or the class/band the user set.
So '{sig} {dest_type} {type} {age}' now gives 'ABC-123 C2 D364 0h', and
'{leads_to}' adds the specific destination. Existing formats using
{dest_type} to show a pinned system should switch that token to
{leads_to}.
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.
Bug:
{dest_type}resolved towhLeadsTo || wh.dest, so a hole pinned to a specific system rendered that system (e.g.J110555) instead of a destination class — even though the token is labelled "Destination class (C5, HS)". Reported:{sig} {dest_type} {type} {age}→ABC-123 J110555 D364 0h.Fix:
{dest_type}is now the destination class viawhDestClass()— the wormhole type's charted destination (D364 → C2). It falls back to the leads-to only when that's itself a class/band (e.g. a K162 the user tagged "C4"), never a pinned system.{leads_to}token = the raw leads-to value: a pinned system (J110555) or the class/band the user set.So the reported format now gives
ABC-123 C2 D364 0h, and adding{leads_to}yields the specific destination.Behaviour note: anyone whose custom format used
{dest_type}to surface a pinned system will now see the class there instead — they should switch that token to{leads_to}. The default format ({sig} {dest_type} {size}) is unchanged in shape; for typed holes it now shows a proper uppercase class.(The token legend in settings is hardcoded English — pre-existing, not i18n'd — so the new
{leads_to}entry follows suit. No web test harness exists to add a unit test; verified via build.)tsc + build + lint (0 errors) pass locally.