Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
46764fc
feat: enhance meal management features in UI polish release
gcharest Dec 10, 2025
76093c2
feat: add conceptual proposal for complete app redesign
gcharest Dec 10, 2025
17c2d63
feat: add unit tests for meal and nutrient file stores
gcharest Dec 10, 2025
161c31d
feat: add Lighthouse CI workflow for performance testing
gcharest Dec 10, 2025
690cb02
feat: enhance PWA support with manifest, icons, and installation tests
gcharest Dec 10, 2025
f7d35ea
feat: update package versions and increment project version to 0.2.0
gcharest Dec 10, 2025
1a12cd3
fix: lint
gcharest Dec 10, 2025
7dd8b2b
fix: fmt
gcharest Dec 10, 2025
0c21dad
fix: add permissions for Lighthouse CI workflow
gcharest Dec 10, 2025
e92c5bf
fix: update code blocks to use text syntax
gcharest Dec 10, 2025
b4b7f80
feat: enhance Lighthouse CI workflow with detailed PR comments and re…
gcharest Dec 10, 2025
68b422b
feat: improve preview server startup process with retries and logging
gcharest Dec 10, 2025
f3a4cd5
feat: streamline accessibility tests workflow
gcharest Dec 10, 2025
28125ef
feat: update background color in manifest
gcharest Dec 10, 2025
2795f89
feat: refine homepage tests for language switching
gcharest Dec 10, 2025
31e7921
feat: update PWA installation tests
gcharest Dec 10, 2025
03170e5
feat: update manifest link in index.html
gcharest Dec 10, 2025
83acf38
feat: optimize browser configuration for local development
gcharest Dec 10, 2025
2828779
feat: refine caching strategy for app data JSON files
gcharest Dec 10, 2025
2869bfd
feat: skip service worker test in development mode
gcharest Dec 10, 2025
7973601
feat: skip language toggle test
gcharest Dec 10, 2025
e6137b6
feat: update browser configuration to include Firefox in local develo…
gcharest Dec 10, 2025
aa96225
fix: revert accessibility workflow
gcharest Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Lighthouse CI

permissions:
contents: read

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
lighthouse:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build

- name: Start preview server
run: |
npm run preview > /tmp/server.log 2>&1 &
echo $! > /tmp/server.pid

# Wait for server to start (retry up to 30 times, 2 second intervals)
for i in {1..30}; do
if curl -f http://localhost:4173/gluko/ > /dev/null 2>&1; then
echo "✓ Server started successfully"
exit 0
fi
echo "Waiting for server... ($i/30)"
sleep 2
done

echo "✗ Server failed to start"
cat /tmp/server.log
exit 1

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v11
with:
configPath: ./lighthouse-budget.json
temporaryPublicStorage: true
runs: 1
uploadArtifacts: true
# Use lighthouse-ci Docker image with Chromium pre-installed for faster execution
# This skips the slow package installation step
chartJson: true

- name: Comment PR with results
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const resultsPath = '.lighthouseci/lhr-latest.json';

if (!fs.existsSync(resultsPath)) {
console.log('No Lighthouse results found');
return;
}

const results = JSON.parse(fs.readFileSync(resultsPath, 'utf-8'));
const categories = results.categories || {};

const formatScore = (score) => {
if (!score) return 'N/A';
return Math.round(score.score * 100);
};

const comment = `## 📊 Lighthouse Report

| Metric | Score |
|--------|-------|
| Performance | ${formatScore(categories.performance)} |
| Accessibility | ${formatScore(categories.accessibility)} |
| Best Practices | ${formatScore(categories['best-practices'])} |
| SEO | ${formatScore(categories.seo)} |
| PWA | ${formatScore(categories.pwa)} |

[View full report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});

- name: Upload Lighthouse results
uses: actions/upload-artifact@v4
if: always()
with:
name: lighthouse-results
path: '.lighthouseci'
retention-days: 30
Comment thread Fixed

- name: Clean up server
if: always()
run: |
if [ -f /tmp/server.pid ]; then
kill $(cat /tmp/server.pid) 2>/dev/null || true
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
.DS_Store
dist
dist-ssr
dev-dist
coverage
*.local

Expand Down
5 changes: 5 additions & 0 deletions docs/releases/v0.5-ui-polish.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ Refine and optimize the user interface across all views (search, calculator, his
- [ ] Search view: Results load within 500ms, clear carb display, favorites accessible
- [ ] Calculator view: Intuitive serving size selection, clear totals, easy to add/remove items
- [ ] History view: Organized by subject/date, one-click re-use, swipe to delete (mobile)
- [ ] View full nutrient breakdown for each saved meal
- [ ] Edit/modify a saved meal entry (nutrients, values, notes)
- [ ] Delete a meal entry (with confirmation)
- [ ] Quick duplicate/copy a meal to calculator
- [ ] Filter/search history by date, subject, or meal name
- [ ] Settings: Clear subject creation/switching, data management options
- [ ] Accessibility: Lighthouse accessibility score ≥ 95, keyboard navigation works throughout
- [ ] Responsiveness: Works well on 320px (small phone) to 800px (tablet) widths
Expand Down
Loading
Loading