Skip to content

Complete repo hardening and issue closure batch - #15

Merged
UmeshCode1 merged 1 commit into
mainfrom
codex/close-issues-9-14
Mar 17, 2026
Merged

UmeshCode1 merged 1 commit into
mainfrom
codex/close-issues-9-14

Conversation

@UmeshCode1

Copy link
Copy Markdown
Owner

This PR completes the open improvement backlog with verified implementation.\n\n## Completed\n- Added CI workflow with lint, test, build, and audit gates\n- Added secret scan gate (gitleaks)\n- Added Vitest + Testing Library baseline with 11 passing tests\n- Re-enabled script linting scope in ESLint config\n- Dependency maintenance batch applied and validated\n- Improved README with env + script usage guidance\n\n## Verification\n- npm run lint\n- npm test\n- npm run build\n- npm audit --json\n\nCloses #9\nCloses #10\nCloses #11\nCloses #12\nCloses #13\nCloses #14

@vercel

vercel Bot commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
ai-ml-club Ready Ready Preview, Comment Mar 17, 2026 7:20pm

Copilot AI review requested due to automatic review settings March 17, 2026 19:19
@UmeshCode1
UmeshCode1 merged commit 9f4e3c8 into main Mar 17, 2026
6 checks passed
@UmeshCode1
UmeshCode1 deleted the codex/close-issues-9-14 branch March 17, 2026 19:23

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

This PR hardens the repository by adding CI quality gates (including secret scanning), introducing a Vitest + Testing Library test baseline, re-enabling lint coverage for operational scripts, updating dependencies, and documenting local setup and script usage.

Changes:

  • Add GitHub Actions CI workflow with lint/test/build/audit plus gitleaks secret scanning.
  • Introduce Vitest configuration + JSDOM setup and add initial unit/component/page tests.
  • Re-enable ESLint coverage for scripts/**, add script-focused lint command, and refresh README guidance (env + scripts).

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Adds CI jobs for gitleaks secret scanning and quality gates (lint/test/build/audit).
eslint.config.mjs Removes scripts/** from global ignores and adds a scripts-specific rule override.
package.json Adds lint:scripts, test, test:watch scripts; adds testing deps and upgrades several packages.
package-lock.json Locks new/updated dependency versions for CI-reproducible installs.
vitest.config.ts Configures Vitest with JSDOM, setup file, globals, and @ path alias.
src/test/setup.ts Adds Testing Library jest-dom matchers and a matchMedia mock for JSDOM.
src/lib/utils.test.ts Adds unit tests for cn utility behavior.
src/hooks/use-pwa-install.test.tsx Adds hook tests for PWA installability/installation behavior.
src/components/ui/status-indicator.test.tsx Adds component tests for StatusIndicator variants and helpers.
src/app/offline/page.test.tsx Adds a page-level render smoke test for the offline route.
README.md Documents local env setup, quality commands, and portable script usage examples.

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

Comment thread vitest.config.ts
test: {
environment: "jsdom",
setupFiles: ["./src/test/setup.ts"],
globals: true,
Comment thread src/lib/utils.test.ts
@@ -0,0 +1,16 @@
import { cn } from "./utils";
@@ -0,0 +1,30 @@
import { render, screen } from "@testing-library/react";
import { StatusBadge, StatusDot, StatusIndicator } from "./status-indicator";
@@ -0,0 +1,25 @@
import { render, screen } from "@testing-library/react";
import type { ReactNode } from "react";
import OfflinePage from "./page";
Comment on lines +1 to +9
import { act, renderHook, waitFor } from "@testing-library/react";
import { usePWAInstall } from "./use-pwa-install";

describe("usePWAInstall", () => {
const originalAlert = window.alert;
const originalUserAgent = navigator.userAgent;

beforeEach(() => {
Object.defineProperty(window, "alert", { value: vi.fn(), configurable: true });
Comment on lines +8 to +17
beforeEach(() => {
Object.defineProperty(window, "alert", { value: vi.fn(), configurable: true });
Object.defineProperty(navigator, "userAgent", { value: "Mozilla/5.0 Chrome", configurable: true });
Object.defineProperty(navigator, "vendor", { value: "Google Inc", configurable: true });
});

afterEach(() => {
Object.defineProperty(window, "alert", { value: originalAlert, configurable: true });
Object.defineProperty(navigator, "userAgent", { value: originalUserAgent, configurable: true });
});
Comment thread .github/workflows/ci.yml
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
Comment thread package.json
Comment on lines 37 to +52
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@tailwindcss/postcss": "^4.2.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/node": "^20.19.37",
"@types/react": "^19.2.14",
"@types/react-dom": "^19",
"dotenv": "^17.2.3",
"eslint": "^9",
"dotenv": "^17.3.1",
"eslint": "^9.39.4",
"eslint-config-next": "16.1.7",
"tailwindcss": "^4",
"jsdom": "^26.1.0",
"tailwindcss": "^4.2.1",
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5"
"typescript": "^5",
"vitest": "^3.2.4"

This branch was successfully deployed

1 active deployment
Preview — 3e99fdc2 Deployed Mar 17, 2026 by vercel[bot]
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