Skip to content

fix: standardize help command display in terminal UI#9

Merged
rudra-sah00 merged 5 commits intoproductionfrom
develop
Nov 7, 2025
Merged

fix: standardize help command display in terminal UI#9
rudra-sah00 merged 5 commits intoproductionfrom
develop

Conversation

@rudra-sah00
Copy link
Owner

📝 Description

This PR includes comprehensive improvements to CI/CD workflows, code quality enforcement, terminal UX, and test coverage reporting.

1. Enhanced Pre-commit Hook with Prettier Validation

Added format:check to the pre-commit hook to ensure all files are properly formatted before allowing commits. This prevents formatting issues from being committed and maintains consistent code style across the entire codebase.

2. Fixed Lighthouse CI Workflow

The Lighthouse CI workflow was failing with CHROME_INTERSTITIAL_ERROR because it attempted to test http://localhost:3000 without first starting the Next.js server. This fix:

  • Starts the Next.js server in the background after build
  • Adds a health check that waits up to 60 seconds for the server to be ready
  • Ensures Lighthouse can successfully connect and perform performance audits
  • Removed production push trigger (only runs on PRs now)

3. Fixed Bundle Size Check Workflow

  • Removed ANALYZE=true flag that was causing BundleAnalyzerPlugin is not a constructor error
  • Simplified to use standard Next.js build output
  • Posts helpful bundle size summary to PR comments

4. Enabled Preview Deployments on PRs

  • Removed needs dependencies from deploy-preview job
  • Preview deployments now run independently on all PRs without waiting for other jobs
  • Provides faster preview URLs for testing (Vercel deployment succeeded)

5. Enhanced Test Coverage PR Comments

Improved the test coverage reporting with:

  • 📊 Visual progress bars for each coverage metric (e.g., ████████████████░░░░)
  • 📈 Difference indicators showing how far above/below targets (e.g., +0.99%)
  • 🔢 Detailed statistics (covered/total for statements, branches, functions, lines)
  • ✅ Clear PASSED/NEEDS ATTENTION status
  • 💡 Helpful tips for developers

6. Terminal UX Improvements

  • Changed !help command to help (removed exclamation mark for standard CLI syntax)
  • Updated all terminal welcome messages, Hero button, and test expectations
  • Ensures consistency across UI and terminal engine
  • Makes terminal feel more professional and intuitive

7. Contact Form Streamlining

  • Removed telegram and discord from contact form options
  • Focus on professional channels: email, LinkedIn, phone, WhatsApp
  • Updated hints and validation logic

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style update (formatting, renaming)
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Configuration change
  • 🔨 Build/CI update

🔗 Related Issues

Fixes Lighthouse CI workflow failures
Fixes Bundle Size Check failures
Improves developer experience with stricter pre-commit validation

📋 Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (390 tests passing, 90.99% coverage)
  • Any dependent changes have been merged and published

🧪 Testing

Test Configuration

  • Node version: 20.x
  • npm version: 10.x
  • OS: macOS / Linux (GitHub Actions)

Test Cases

  1. Pre-commit hook validation: Format check runs before each commit
  2. Prettier check: npm run format:check - all files pass
  3. TypeScript compilation: npm run type-check - no errors
  4. ESLint validation: npm run lint - zero warnings/errors
  5. Jest tests: All 390 tests passing with 90.99% coverage
  6. Terminal help command: Verified help command works without exclamation mark
  7. Contact form: Verified only 4 contact options shown (email, LinkedIn, phone, WhatsApp)
  8. Lighthouse CI: Server starts successfully before performance testing
  9. Bundle Size Check: Standard build completes and reports size
  10. Preview Deployment: Vercel preview deployed successfully

📸 Screenshots/Videos

Husky Pre-commit Hook in Action:

$ git commit -m "fix: update"

> portfolio@0.1.0 format:check
> prettier --check .

Checking formatting...
All matched files use Prettier code style! ✓

→ lint-staged running...
✓ ESLint passed
✓ TypeScript check passed

[develop 8961b0f] fix: standardize help command display

- Update all terminal welcome messages to use help command
- Update Hero button text and test expectations
- Remove exclamation mark from command references
- Ensures consistency with terminal engine implementation
@rudra-sah00 rudra-sah00 self-assigned this Nov 7, 2025
@vercel
Copy link
Contributor

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
portfolio Ignored Ignored Nov 7, 2025 10:42am

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📦 Bundle Size Report

✅ Build completed successfully!

Build Info:

  • Next.js production build completed
  • Check the workflow logs for detailed size metrics

Guidelines:

  • 🎯 First Load JS: Aim for < 200KB
  • Code Splitting: Automatic with Next.js
  • 🗜️ Compression: Enabled (gzip/brotli)

💡 Tip: Review the build output in workflow logs for page-by-page size breakdown

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

All CI checks passed! This PR is ready for review.

🔍 Preview Deployment: https://portfolio-bh9zdeik8-rudras-projects-194b270d.vercel.app

✅ Tests Passed
✅ Coverage Met
✅ Build Successful

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📊 Test Coverage Report

Overall Status: ✅ PASSED

Metric Coverage Visual vs Target Status
Statements 92.03% ██████████████████░░ +2.0%
Branches 89.84% ██████████████████░░ +4.8%
Functions 83.96% █████████████████░░░ +4.0%
Lines 92.03% ██████████████████░░ +2.0%

📈 Detailed Metrics

  • Total Files Tested: 34
  • Statements Covered: 4343 / 4719
  • Branches Covered: 416 / 463
  • Functions Covered: 89 / 106
  • Lines Covered: 4343 / 4719

🎯 Target Thresholds

  • Statements: ≥ 90%
  • Branches: ≥ 85%
  • Functions: ≥ 80%
  • Lines: ≥ 90%

Excellent! All coverage thresholds exceeded. Great work! 🎉


💡 Tip: Run npm run test:coverage locally to see detailed coverage reports

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/components/TerminalPopup.tsx 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

⚡ Lighthouse Performance Report

Check the full report in the workflow artifacts.

Target thresholds:

  • 🎯 Performance: ≥ 90
  • ♿ Accessibility: ≥ 95
  • 🎨 Best Practices: ≥ 90
  • 🔍 SEO: ≥ 95

@github-actions github-actions bot added ci/cd documentation Improvements or additions to documentation size: small and removed size: small labels Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📦 Bundle Size Report

✅ Build completed successfully!

Build Info:

  • Next.js production build completed
  • Check the workflow logs for detailed size metrics

Guidelines:

  • 🎯 First Load JS: Aim for < 200KB
  • Code Splitting: Automatic with Next.js
  • 🗜️ Compression: Enabled (gzip/brotli)

💡 Tip: Review the build output in workflow logs for page-by-page size breakdown

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

All CI checks passed! This PR is ready for review.

🔍 Preview Deployment: https://portfolio-llhnj2a3k-rudras-projects-194b270d.vercel.app

✅ Tests Passed
✅ Coverage Met
✅ Build Successful

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

⚡ Lighthouse Performance Report

Check the full report in the workflow artifacts.

Target thresholds:

  • 🎯 Performance: ≥ 90
  • ♿ Accessibility: ≥ 95
  • 🎨 Best Practices: ≥ 90
  • 🔍 SEO: ≥ 95

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📦 Bundle Size Report

✅ Build completed successfully!

Build Info:

  • Next.js production build completed
  • Check the workflow logs for detailed size metrics

Guidelines:

  • 🎯 First Load JS: Aim for < 200KB
  • Code Splitting: Automatic with Next.js
  • 🗜️ Compression: Enabled (gzip/brotli)

💡 Tip: Review the build output in workflow logs for page-by-page size breakdown

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🚀 Preview Deployment Ready!

🔍 Preview URL: https://portfolio-bs5twrsha-rudras-projects-194b270d.vercel.app

✅ Build Successful
✅ Preview Environment Created

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📊 Test Coverage Report

Overall Status: ✅ PASSED

Metric Coverage Visual vs Target Status
Statements 92.03% ██████████████████░░ +2.0%
Branches 89.84% ██████████████████░░ +4.8%
Functions 83.96% █████████████████░░░ +4.0%
Lines 92.03% ██████████████████░░ +2.0%

📈 Detailed Metrics

  • Total Files Tested: 34
  • Statements Covered: 4343 / 4719
  • Branches Covered: 416 / 463
  • Functions Covered: 89 / 106
  • Lines Covered: 4343 / 4719

🎯 Target Thresholds

  • Statements: ≥ 90%
  • Branches: ≥ 85%
  • Functions: ≥ 80%
  • Lines: ≥ 90%

Excellent! All coverage thresholds exceeded. Great work! 🎉


💡 Tip: Run npm run test:coverage locally to see detailed coverage reports

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

⚡ Lighthouse Performance Report

Check the full report in the workflow artifacts.

Target thresholds:

  • 🎯 Performance: ≥ 90
  • ♿ Accessibility: ≥ 95
  • 🎨 Best Practices: ≥ 90
  • 🔍 SEO: ≥ 95

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📦 Bundle Size Report

✅ Build completed successfully!

Build Info:

  • Next.js production build completed
  • Check the workflow logs for detailed size metrics

Guidelines:

  • 🎯 First Load JS: Aim for < 200KB
  • Code Splitting: Automatic with Next.js
  • 🗜️ Compression: Enabled (gzip/brotli)

💡 Tip: Review the build output in workflow logs for page-by-page size breakdown

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🚀 Preview Deployment Ready!

🔍 Preview URL: https://portfolio-xvnilohv4-rudras-projects-194b270d.vercel.app

✅ Build Successful
✅ Preview Environment Created

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📊 Test Coverage Report

Overall Status: ✅ PASSED

Metric Coverage Visual vs Target Status
Statements 92.03% ██████████████████░░ +2.0%
Branches 89.84% ██████████████████░░ +4.8%
Functions 83.96% █████████████████░░░ +4.0%
Lines 92.03% ██████████████████░░ +2.0%

📈 Detailed Metrics

  • Total Files Tested: 34
  • Statements Covered: 4343 / 4719
  • Branches Covered: 416 / 463
  • Functions Covered: 89 / 106
  • Lines Covered: 4343 / 4719

🎯 Target Thresholds

  • Statements: ≥ 90%
  • Branches: ≥ 85%
  • Functions: ≥ 80%
  • Lines: ≥ 90%

Excellent! All coverage thresholds exceeded. Great work! 🎉


💡 Tip: Run npm run test:coverage locally to see detailed coverage reports

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

⚡ Lighthouse Performance Report

Check the full report in the workflow artifacts.

Target thresholds:

  • 🎯 Performance: ≥ 90
  • ♿ Accessibility: ≥ 95
  • 🎨 Best Practices: ≥ 90
  • 🔍 SEO: ≥ 95

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📦 Bundle Size Report

✅ Build completed successfully!

Build Info:

  • Next.js production build completed
  • Check the workflow logs for detailed size metrics

Guidelines:

  • 🎯 First Load JS: Aim for < 200KB
  • Code Splitting: Automatic with Next.js
  • 🗜️ Compression: Enabled (gzip/brotli)

💡 Tip: Review the build output in workflow logs for page-by-page size breakdown

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🚀 Preview Deployment Ready!

🔍 Preview URL: https://portfolio-4yvvwfgcu-rudras-projects-194b270d.vercel.app

✅ Build Successful
✅ Preview Environment Created

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

📊 Test Coverage Report

Overall Status: ✅ PASSED

Metric Coverage Visual vs Target Status
Statements 92.03% ██████████████████░░ +2.0%
Branches 89.84% ██████████████████░░ +4.8%
Functions 83.96% █████████████████░░░ +4.0%
Lines 92.03% ██████████████████░░ +2.0%

📈 Detailed Metrics

  • Total Files Tested: 34
  • Statements Covered: 4343 / 4719
  • Branches Covered: 416 / 463
  • Functions Covered: 89 / 106
  • Lines Covered: 4343 / 4719

🎯 Target Thresholds

  • Statements: ≥ 90%
  • Branches: ≥ 85%
  • Functions: ≥ 80%
  • Lines: ≥ 90%

Excellent! All coverage thresholds exceeded. Great work! 🎉


💡 Tip: Run npm run test:coverage locally to see detailed coverage reports

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

⚡ Lighthouse Performance Report

Check the full report in the workflow artifacts.

Target thresholds:

  • 🎯 Performance: ≥ 90
  • ♿ Accessibility: ≥ 95
  • 🎨 Best Practices: ≥ 90
  • 🔍 SEO: ≥ 95

@rudra-sah00 rudra-sah00 merged commit faf6eb2 into production Nov 7, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants