Skip to content

feat(desktop): flag secret env vars in the {{ref}} highlight#98

Merged
gandarfh merged 1 commit into
mainfrom
feat/secret-ref-highlight
Jun 16, 2026
Merged

feat(desktop): flag secret env vars in the {{ref}} highlight#98
gandarfh merged 1 commit into
mainfrom
feat/secret-ref-highlight

Conversation

@gandarfh

Copy link
Copy Markdown
Member

Desktop visual half of the secret env-var signalling (server half is the secret token modifier in httui-lang). A bare {{KEY}} whose head matches a keychain-backed (is_secret) variable in the active environment is painted with .cm-ref-secret (amber + dotted underline), distinct from the purple ref highlight. Dotted/path refs ({{KEY.body}}) are block references, never marked.

Source: a module-level set (secret-env-keys.ts) the environment store repopulates on refresh from the active env variables — the highlight reads it synchronously, same pattern as the editor content/unsaved sets. The desktop does not consume server semantic tokens (Lezer first-paint), so is_secret comes from the store, not the server.

7 tests green (3 new). Known minor: on an env switch the highlight refreshes on the next edit/scroll (module-level set, no forced redecorate). Pending owner visual gate.

@gandarfh gandarfh force-pushed the feat/secret-ref-highlight branch 3 times, most recently from f558b17 to f6efa82 Compare June 16, 2026 16:00
@gandarfh gandarfh force-pushed the feat/secret-ref-highlight branch from f6efa82 to a7f9592 Compare June 16, 2026 16:12
@gandarfh gandarfh merged commit 41d2741 into main Jun 16, 2026
6 checks passed
@gandarfh gandarfh deleted the feat/secret-ref-highlight branch June 16, 2026 16:15
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