Skip to content

Add a TELOS explainer popover to the dashboard - #4

Open
philmcneely wants to merge 1 commit into
danielmiessler:mainfrom
philmcneely:telos-explainer
Open

Add a TELOS explainer popover to the dashboard#4
philmcneely wants to merge 1 commit into
danielmiessler:mainfrom
philmcneely:telos-explainer

Conversation

@philmcneely

@philmcneely philmcneely commented Aug 2, 2026

Copy link
Copy Markdown

The TELOS panel lists coded entries (P1, M1, …) but nothing on the page explains what TELOS is or what the codes mean. This adds an accessible info popover on the TELOS heading — hover, tap, or keyboard focus — that:

  • defines TELOS (Greek for "purpose / end goal"),
  • lists the section codes (P Problem, M Mission, N Narrative, G Goal, C Challenge, I Idea, K Metric/KPI),
  • notes the numbers are stable IDs (M1 answers P1), not a ranking,
  • links to the TELOS framework repo.

Notes

  • Pure presentation + logic — no new dependencies, no data or config changes.
  • Telos parsing/label logic extracted to cms/.vitepress/theme/telosCodes.ts (mirroring the existing currentState.ts pattern) and covered by tests/telosCodes.test.ts.
  • Also generalized the row parser to accept any TELOS code (not just P/M/G), so the codes the popover documents all render. Happy to drop this last part if the P/M/G scoping was intentional
  • Accessible: a real <button> with aria-label, opening on hover, tap, and keyboard focus (:focus-within) — so it works on touch devices, not just desktop hover.
  • Styled to match the existing console theme (theme variables, no hard-coded colors).

Verification

  • bun run build — clean
  • bun test — 9/9 pass

Screenshot

Screenshot 2026-08-01 at 8 22 52 PM

@philmcneely
philmcneely marked this pull request as ready for review August 2, 2026 01:38
Copilot AI review requested due to automatic review settings August 2, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an in-dashboard TELOS explainer popover and extracts TELOS code parsing/labeling into a reusable helper module, with accompanying unit tests—so users can understand what TELOS means and how to interpret codes like P1, M1, etc.

Changes:

  • Added an accessible-ish TELOS info popover on the dashboard header and enhanced TELOS rows to show labels.
  • Extracted TELOS code parsing/label logic into cms/.vitepress/theme/telosCodes.ts.
  • Added bun:test coverage for TELOS parsing/label utilities.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/telosCodes.test.ts Adds unit tests for TELOS code labeling and parsing helpers.
cms/.vitepress/theme/telosCodes.ts Introduces shared helpers for extracting TELOS ids/text and mapping codes to labels.
cms/.vitepress/theme/components/DaemonDashboard.vue Adds TELOS info popover UI and switches TELOS parsing to the extracted helpers.
Suppressed comments (1)

cms/.vitepress/theme/components/DaemonDashboard.vue:114

  • Using title for the TELOS section label is not reliably announced by screen readers and doesn’t work on touch devices. Consider adding an aria-label (or aria-describedby) so the id conveys both the stable code and its human label accessibly.
              <span class="telos-id" :title="telosCodeLabel(item)">{{ extractTelosId(item) }}</span>

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

Comment on lines +92 to +95
<span class="telos-info">
<button class="telos-info-btn" type="button" aria-label="What is TELOS?">ⓘ</button>
<span class="telos-info-pop" role="tooltip">
<span class="tip-head">TELOS <em>· purpose / end goal</em></span>
Comment thread cms/.vitepress/theme/telosCodes.ts Outdated
Comment on lines +18 to +34
/** The "<code><number>" id at the start of a telos entry (e.g. "P1"); '---' if absent. */
export function extractTelosId(item: string): string {
const match = item.match(/^([A-Za-z]+\d+)/)
return match ? match[1] : '---'
}

/** The entry text with its leading "<code>: " prefix removed. */
export function extractTelosText(item: string): string {
return item.replace(/^[A-Za-z]+\d+:\s*/, '')
}

/** Friendly section name for a telos entry's code, or '' when the code is unknown. */
export function telosCodeLabel(item: string): string {
const m = item.match(/^([A-Za-z]+)\d+/)
if (!m) return ''
return TELOS_CODE_LABELS[m[1].toUpperCase()] || ''
}
The TELOS panel lists coded entries (P1, M1, ...) with nothing on the
page explaining what TELOS is or what the codes mean. Add an accessible
info popover on the TELOS heading (hover, tap, or keyboard focus) that
defines TELOS, lists the section codes, notes the numbers are stable IDs
rather than a ranking, and links to the framework.

- No new dependencies; no data or config changes.
- Telos parsing/label logic extracted to theme/telosCodes.ts (mirroring
  currentState.ts) and covered by tests/telosCodes.test.ts (bun test).
- Row parser recognizes the documented TELOS code set (P/M/N/G/C/I/K),
  ignores non-codes, and normalizes ids to uppercase -- consistent with
  the labels and the popover legend.
- A11y: the popover is linked to its trigger via aria-describedby, and
  each id cell gets an aria-label combining the code and its section name.
@philmcneely

Copy link
Copy Markdown
Author

Thanks @copilot — good catches, addressed in the latest push:

  • Parser was too permissive. Scoped extractTelosId / extractTelosText to the documented TELOS code set (P/M/N/G/C/I/K, derived from the label map so they can't drift), so non-codes like COVID19: are no longer treated as ids or stripped. IDs are now uppercase-normalized. (Still happy to restrict this to P/M/G only if the original scoping was intentional — the popover stands on its own either way.)
  • Popover association. The tooltip now has an id and the trigger references it via aria-describedby.
  • title on id cells. Added an aria-label combining the code and its section name (e.g. "P1, Problem") so it's announced by screen readers.

Verified: bun run build clean, bun test 10/10.

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.

2 participants