Skip to content

feat!: Frontend infrastructure - #24

Open
PaulKMueller (PaulKMueller) wants to merge 16 commits into
mainfrom
frontend-infrastructure
Open

feat!: Frontend infrastructure#24
PaulKMueller (PaulKMueller) wants to merge 16 commits into
mainfrom
frontend-infrastructure

Conversation

@PaulKMueller

Copy link
Copy Markdown

Changes

Introduces the shared infrastructure for static report frontends:

  • Adds the Vite/React frontend package and packages its build output with quant-ranger.
  • Adds quant-ranger frontend export and GitHub Pages deployment documentation.
  • Standardizes updater artifacts passed to aggregators.
  • Updates CI, packaging, dependencies, and tests.

@PaulKMueller PaulKMueller (PaulKMueller) changed the title Frontend infrastructure feat: Frontend infrastructure Aug 18, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8b47c27) to head (67d4c14).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        50    +1     
  Lines         3077      3122   +45     
=========================================
+ Hits          3077      3122   +45     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PaulKMueller PaulKMueller (PaulKMueller) changed the title feat: Frontend infrastructure feat!: Frontend infrastructure Aug 19, 2026
@PaulKMueller
PaulKMueller (PaulKMueller) marked this pull request as ready for review August 19, 2026 15:50
@ytausch

Copy link
Copy Markdown
Member

As mentioned via DM (copying here for visibility), could you ask your agent to bring test coverage back to 100%? That’s the standard we follow in this repo, since adding and maintaining these tests is relatively inexpensive compared with manually assessing whether coverage is sufficient.

@PaulKMueller
PaulKMueller (PaulKMueller) marked this pull request as draft August 24, 2026 13:45
@PaulKMueller
PaulKMueller (PaulKMueller) marked this pull request as ready for review August 25, 2026 11:08
Comment thread .gitignore
Comment on lines +170 to +171
!frontend/src/lib/
!frontend/src/lib/**

Choose a reason for hiding this comment

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

This is a huge red flag that you need to re-allow these folder like this.
This is a flaw of the default .gitignore that we use which is insanely messy and needs to be cleaned up at some point.

In this case here I recommend removing everything that isn't strictly necessary and maybe contributing this back in the future

I used the following one somewhere else, maybe this is a good starting point:

# Explicitly unignore hidden files for ripgrep. Individual folders can still be ignored in the blocks below.
!.*

# macOS
.DS_Store
*.icloud

# IDEs
.idea/
.vscode/

# Python
__pycache__/
.pytest_cache/
.mypy_cache/
*.py[cod]
*$py.class
.ipynb_checkpoints
.ruff_cache/
*.egg-info/
*.egg
.pixi

# coverage
.coverage
.coverage.*
coverage.xml
/coverage

# build outputs of all kinds
build/
out/
output/
dist/
.cache/
/site
docs/_build/

# dotenv files and related
*.pem
*.env
*.env.*

# frontend
node_modules
.pnpm-debug.log*
.pnpm-store
*.tsbuildinfo

playwright-report/
test-results/

Comment thread pixi.toml
Comment on lines +40 to +51
[feature.frontend.tasks]
frontend-install = "pnpm --dir frontend install --frozen-lockfile"
frontend-preview = "pnpm --dir frontend run dev"
frontend-build = { cmd = "pnpm --dir frontend run build", depends-on = [
"frontend-install",
] }
frontend-biome = { cmd = "pnpm --dir frontend run lint:biome", depends-on = [
"frontend-install",
] }
frontend-eslint = { cmd = "pnpm --dir frontend run lint:eslint", depends-on = [
"frontend-install",
] }

Choose a reason for hiding this comment

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

Bit of a personal opinion, but nesting task different task runners is an anti-pattern.

Just use pnpm directly without having to replicate every. single. script. as a pixi task

pixi run pnpm dev works. Alternatively just use pixi shell

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the idea!
I would push back on this a little.
We get a simpler .lefthook.yaml as well as simpler CI and one developer entry point.
Most people will never need to run any pnpm commands in this repo.

In the current state, people can just look into the pixi.toml and see all relevant entry points for development.

Comment thread frontend/package.json
Comment on lines +9 to +15
"format": "biome format --write .",
"format:check": "biome format .",
"lint": "pnpm run lint:biome && pnpm run lint:eslint",
"lint:check": "pnpm run lint:biome:check && pnpm run lint:eslint",
"lint:biome": "biome check --write .",
"lint:biome:check": "biome check .",
"lint:eslint": "eslint ."

Choose a reason for hiding this comment

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

Just use:

  • format:check: biome check .,
  • format:fix: biome format --write ., and
  • lint: eslint .

The amount of commands is overkill

Comment thread .gitignore
quant_ranger/_frontend/
_site/
/
# Legacy local sample data; frontend exports and workflows use _site.

Choose a reason for hiding this comment

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

nit: why is this suddenly needed? if it is indeed legacy why wasn't this line needed previously?

Comment thread frontend/eslint.config.js
@@ -0,0 +1,67 @@
import js from '@eslint/js'

Choose a reason for hiding this comment

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

use eslint-plugin-better-tailwindcss as well:

import pluginTailwind from 'eslint-plugin-better-tailwindcss'

// ...

{
    files: ['**/*.{js,jsx,ts,tsx,mdx}'],
    languageOptions: {
      parserOptions: {
        ecmaFeatures: {
          jsx: true
        }
      }
    },
    rules: {
      ...pluginTailwind.configs['recommended-warn'].rules,
      'better-tailwindcss/enforce-consistent-class-order': 'error',
      'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
      'better-tailwindcss/enforce-consistent-variable-syntax': 'warn',
      'better-tailwindcss/no-conflicting-classes': 'error',
      'better-tailwindcss/no-duplicate-classes': 'warn',
      'better-tailwindcss/no-restricted-classes': 'error',
      'better-tailwindcss/no-unnecessary-whitespace': 'warn',
      'better-tailwindcss/no-unknown-classes': 'error'
    },
    plugins: {
      'better-tailwindcss': pluginTailwind
    },
    settings: {
      'better-tailwindcss': { entryPoint: '<path-to-tailwind-config>.css', rootFontSize: 16 }
    }
  }

Comment thread frontend/eslint.config.js
import { defineConfig, globalIgnores } from 'eslint/config'
import reactHooks from 'eslint-plugin-react-hooks'
import globals from 'globals'
import tseslint from 'typescript-eslint'

Choose a reason for hiding this comment

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

Suggested change
import tseslint from 'typescript-eslint'
import { configs as javascriptConfigs } from '@eslint/js'
import { configs as typescriptConfigs } from 'typescript-eslint'

and then use:

javascriptConfigs.recommended,
typescriptConfigs.recommended,
typescriptConfigs.recommendedTypeChecked,
typescriptConfigs.stylisticTypeChecked,

instead of only [js.configs.recommended, ...tseslint.configs.recommendedTypeChecked].

The change to the variable names is absolutely a nit pick, but would like to see a few more typescript eslint rules being enabled 😅


Note: The "suggestion" doesn't apply cleanly as the import from @eslint/js would be duplicated and a few more changes would be needed for everything to work 😅

Comment thread frontend/eslint.config.js
Comment on lines +57 to +66
{
// These modules validate data from URL parameters and local storage before
// exposing typed values. The standard library types JSON arrays as any[].
files: ['src/copier/dashboard-url.ts', 'src/updaters/usePullRequests.ts'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off'
}
}

Choose a reason for hiding this comment

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

This shouldn't be necessary. In almost all cases you don't actually have to disable eslint rules. Small changes to your types will most likely fix the issue.

Comment thread frontend/src/styles.css
Comment on lines +14 to +20
* {
box-sizing: border-box;
}

body {
margin: 0;
}

Choose a reason for hiding this comment

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

I suspect this will be done in a PR stacked on top of this one so this might not really be that applicable, but I'll mention it anyway:

Use a reset stylesheet. This is something tailwind gives you by default, so I suspect this is just an artifact of how the stacked PRs got split up.

With tailwind (or a reset stylesheet) you don't need to include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants