Skip to content

fix(dashboard): improve math and accessibility - #25

Merged
rapjul merged 2 commits into
mainfrom
fix/dashboard-math-notation
Nov 1, 2026
Merged

rapjul merged 2 commits into
mainfrom
fix/dashboard-math-notation

Conversation

@rapjul

@rapjul rapjul commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Render dashboard module descriptions and relevant titles with MathText so mathematical symbols and subscripts display correctly.
  • Align Fourier series coefficients with the practice module and preserve the requested F(ω) spectrum notation.
  • Improve light-theme badge and action contrast, and give module titles level-two headings.
  • Add browser coverage for rendered expressions, module links, heading levels, and contrast in both themes.

Verification

  • npm run test:coverage -- --maxWorkers=2 --testTimeout=20000 (1,834 tests passed).
  • Focused dashboard Playwright tests passed in Desktop Chrome, including heading and contrast checks.
  • npm run check, npm run build, npm run lint:imports, and npm run format:check passed.
  • gitleaks found no leaks in the changed files.
  • npm audit reported seven low-severity findings in existing dependencies; its suggested fix would make a breaking dependency change.

Summary by CodeRabbit

  • New Features
    • Module titles and descriptions now display mathematical notation more clearly, including equations and technical symbols.
  • Tests
    • Expanded homepage checks to cover all six module cards, their links and descriptions, and the rendering of mathematical notation.

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e6d5d684-29a6-495b-9e15-df5e870777ff
Commits

Reviewing files that changed from the base of the PR and between feef5c2 and 83adce1.

Files selected for processing: 2
  • src/routes/+page.svelte
  • tests/e2e/navigation-and-theme.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 2
  • GitHub Check: CodeRabbit
  • GitHub Check: Tests, properties, and production workflows
Additional context used
Code guidelines: 3
docs/adrs/0035-standardized-lib-path-aliases-for-components-and-solvers.md — auto-discovered
.agents/code-style.md — auto-discovered
.agents/architecture.md — auto-discovered
Path-based instructions: 4
Applicability reference: .agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice) **Standardized `$lib` Path Aliases for Cross-Directory Imports**: All cross-directory imports across UI components (`$lib/co...

CodeRabbit inference engine (docs/adrs/0035-standardized-lib-path-aliases-for-components-and-solvers.md)

Files:

  • tests/e2e/navigation-and-theme.spec.ts
Applicability reference: .agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice) For detailed requirements and specifications, see: [Code Style & Defensive Guidelines](code-style.md) Source excerpt: Avoid...

CodeRabbit inference engine (.agents/code-style.md)

Files:

  • src/routes/+page.svelte
Applicability reference: .agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice) For detailed requirements and specifications, see: [Code Style & Defensive Guidelines](code-style.md) Sour...

CodeRabbit inference engine (.agents/code-style.md)

Files:

  • tests/e2e/navigation-and-theme.spec.ts
  • src/routes/+page.svelte
Applicability reference: .agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice) For detailed requirements and specifications, see: [System Architecture](architecture.md) Source excerpt:

CodeRabbit inference engine (.agents/architecture.md)

Files:

  • src/routes/+page.svelte
Learnings: 1
Common learnings
Learnt from: CR
Repo: rapjul/Analog-Signal-Processing-Practice

Timestamp: 2026-11-01T05:03:02.909Z
Learning: Applicability reference:
.agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice)
## Detailed Guidelines
For detailed requirements and specifications, see:

- [Mathematical Rendering Guidelines](math-rendering.md)

Source excerpt:
# Mathematical Rendering Guidelines

## Non-Negotiable Rules

### 2. LaTeX Component Enforcement

All mathematical expressions, variables, units, dynamic equations, and inline formulas **MUST** be rendered strictly using LaTeX wrapper components (`<MathText>`, `<MathInline>`, or `<MathBlock>`).
Learnt from: CR
Repo: rapjul/Analog-Signal-Processing-Practice

Timestamp: 2026-11-01T05:03:02.909Z
Learning: Applicability reference:
.agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice)
## Detailed Guidelines
For detailed requirements and specifications, see:

- [Mathematical Rendering Guidelines](math-rendering.md)

Do **NOT** use raw Unicode math characters in standard HTML elements (buttons, headings, labels, paragraphs, table cells, or tooltips).

**Prohibited raw symbols include:**

- Operators & Sums: $\sum, \int, \prod, \pm, \mp, \le, \ge, \ne, \approx, \infty$
- Variables & Constants: $\omega, \pi, \theta, \phi, \sigma, \tau, \alpha, \beta, \gamma, \Delta, \zeta$
- Units & Angles: $\angle, \degree, \Omega, \mu$
Learnt from: CR
Repo: rapjul/Analog-Signal-Processing-Practice

Timestamp: 2026-11-01T05:03:02.909Z
Learning: Applicability reference:
.agents/AGENTS.md: # Workspace Agent Rules — SignalLab (Analog Signal Processing Practice)
## Detailed Guidelines
For detailed requirements and specifications, see:

- [Mathematical Rendering Guidelines](math-rendering.md)

Source excerpt:
# Mathematical Rendering Guidelines

## Non-Negotiable Rules

### 2. LaTeX Component Enforcement

- **`<MathText>`**: Use for mixed prose, sentence descriptions, labels, button tags, and table cells containing LaTeX math delimited by `$ ... $` or `$$ ... $$` without introducing focusable keyboard tab-stops. Always use `String.raw` template literals (`text={String.raw`...`}`) for strings containing LaTeX backslashes or curly braces. (See [ADR 0020](../docs/adrs/0020-mathtext-prose-rendering-and-keyboard-navigation-accessibility.md)).
Additional comments: 2
src/routes/+page.svelte: 1

9-9: LGTM!

Also applies to: 17-17, 27-27, 36-36, 54-54, 56-56, 64-66, 103-106

tests/e2e/navigation-and-theme.spec.ts: 1

47-53: LGTM!

Also applies to: 55-103

Walkthrough

The homepage now renders mathematical notation in module titles and descriptions through MathText. End-to-end tests check the six module cards’ destinations, descriptions, TeX annotations, and absence of KaTeX errors.

Changes: Dashboard math rendering

Layer / File(s) Summary
Math-marked module cards
src/routes/+page.svelte, tests/e2e/navigation-and-theme.spec.ts
Module titles and descriptions use MathText to render added mathematical notation. The Fourier-series description changes c_n to F_n. End-to-end tests check card destinations, descriptions, TeX annotations, and KaTeX errors.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 83adc

Dashboard math rendering has no identified merge-blocking risks.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title "fix(dashboard): improve math and accessibility" names two aspects of the change. The summary and objectives confirm the math part: dashboard module copy now renders through MathText, includ… Confirm whether the change includes accessibility work. If it does not, retitle to describe the main change, for example "fix(dashboard): format mathematical notation". If it does, list the accessibility changes in the PR description so the…
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Full details: Title check

Explanation

The title "fix(dashboard): improve math and accessibility" names two aspects of the change. The summary and objectives confirm the math part: dashboard module copy now renders through MathText, including ODE variables, Fourier coefficients, CTFT notation, Laplace terms, and transfer functions. The accessibility part is not supported by the summary, which describes rendering and browser tests but no accessibility changes, and the objectives also do not mention accessibility. The title is therefore partially related to the changeset: it refers to a real aspect but overstates the scope and names an unsupported goal. The primary change is mathematical notation formatting, as PR #25's own title states.

Resolution

Confirm whether the change includes accessibility work. If it does not, retitle to describe the main change, for example "fix(dashboard): format mathematical notation". If it does, list the accessibility changes in the PR description so the title can be checked against them.

Finishing Touches
Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T16:00:01.842293Z ce40737 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

- Render module descriptions and titles with readable mathematical notation.
- Align Fourier series coefficients with the practice module.
- Cover dashboard expressions, surrounding text, and module links.
@rapjul
rapjul force-pushed the fix/dashboard-math-notation branch from adc94b2 to 83adce1 Compare November 1, 2026 04:53

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

Reviewed the complete diff of the single commit against main and verified it empirically — npm run check (0 errors/0 warnings), npm run lint:imports, npm run format:check, and the full tests/e2e/navigation-and-theme.spec.ts suite (7/7, Desktop Chrome) all pass.

  • Dashboard math rendering — module titles and descriptions render through MathText, with $…$ LaTeX for y_h(t)/y_p(t), the coefficient list, |F(ω)|², s, and H(s).
  • Notation alignment — cn becomes F_n, matching the fourier-series module's own label (coefficient-metadata.ts:17); F(ω) is intentionally preserved per the PR description, so the CTFT card stays on the requested spectrum notation.
  • e2e coverage — a new test walks all six cards in modules array order, asserting each href, surrounding prose, the exact KaTeX annotation sources, and zero .katex-error; the two old full-string text= title assertions become partial toContainText checks, which is the right call because KaTeX's hidden MathML text breaks exact-text matching.

Spot-checked the load-bearing contracts: MathText renders an inline <span> (valid inside <h3>/<p>), emits one annotation[encoding="application/x-tex"] per $…$ segment with the trimmed source verbatim, and throwOnError: false surfaces compile failures as .katex-error — so the test's zero-error assertion is a genuine compile check. The card indexes and href expectations are sound (paths.base is empty in the dev Playwright config).

Pullfrog  | View workflow run | Using glm-5.3-flash | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

Reviewed the delta since the prior review (adc94b2, #25 (review)): the branch was rebased onto the SvelteKit 3 migration on main, and the only change is mechanical — import { base } becomes import { resolve } from $app/paths, with the card link now href={resolve(mod.link)}. Re-verified on the new head with the lockfile's @sveltejs/kit 3.1.0: npm run check (0 errors/0 warnings), npm run lint:imports, npm run format:check, and the full tests/e2e/navigation-and-theme.spec.ts suite (7/7, Desktop Chrome) all pass.

Everything from the prior review still holds — dashboard math rendering, F_n notation alignment, and the annotation-based e2e assertions are unchanged.

Pullfrog  | View workflow run | Using glm-5.3-flash | 𝕏

- Improve light-theme contrast for exam badges and practice links.
- Give module titles the correct heading level.
- Verify heading structure and text contrast in both themes.

rapjul commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Follow-up in ce40737:

  • Improved light-theme contrast for exam-scope badges and “Practice Now”.
  • Changed module titles to level-two headings while preserving their styling.
  • Added browser checks for heading levels and text contrast in both themes.

Verification: focused dashboard browser tests, npm run check, import lint, formatting, and the full coverage suite (1,834 tests) passed.

@rapjul rapjul changed the title fix(dashboard): format mathematical notation fix(dashboard): improve math and accessibility Nov 1, 2026

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

Reviewed the delta since the prior review (83adce1, #25 (review)): one accessibility-focused commit, ce40737. Verified empirically on this head — npm run check (0 errors, 0 warnings) and the full tests/e2e/navigation-and-theme.spec.ts suite (8/8, Desktop-Chrome) pass.

  • Heading semantics — Promoted module card titles from <h3> to <h2>, fixing a skipped heading level under the dashboard's h1 hero and matching the h2 problem-title convention in ProblemHeader. The global * { margin: 0 } reset in app.css means no layout side effects from the tag swap.
  • Light-theme contrast — In the light theme, .module-badge now uses --text-secondary and .status-indicator.ready uses --accent-hover; both :global([data-theme="light"]) rules out-specify their base rules, and the affected color pairs clear WCAG AA (roughly 5.9–6.8:1).
  • Contrast regression coverage — Added an e2e test that computes WCAG contrast ratios for .module-badge (against its own background) and .status-indicator.ready (against the card background) in both themes, asserting ≥ 4.5:1 on all six cards, plus a count assertion on h2.module-title. The test's luminance helper assumes opaque rgb() computed values — every theme token it touches is opaque hex, so that assumption holds.

Pullfrog  | View workflow run | Using glm-5.3-flash | 𝕏

@rapjul

rapjul commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: ce40737d16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rapjul
rapjul merged commit a96ce0e into main Nov 1, 2026
10 checks passed
@rapjul
rapjul deleted the fix/dashboard-math-notation branch November 1, 2026 20:45
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