Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 12 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,15 @@ A React + TypeScript + Vite front-end for Apperson Auto.
manual cleanup.

## Memory
(Add lessons learned here, one bullet each.)
- Declare Vite `define` variables (e.g., `__APP_VERSION__`) in `src/global.d.ts` to ensure TypeScript resolves them cleanly.
- Ensure the mobile navigation list (`.nav-list`) has `height: 100%` when using absolute positioning for bottom-anchored elements.


## Pull requests

### PR body conventions (violations may be machine-rejected)

- **Summary**: markdown bullet points, one change per bullet — never a run-on paragraph.
- **Test evidence**: paste the REAL runner output verbatim (the lines showing pass/fail and test counts), inside a ``` fence — never a description like "all tests passed". If the output has scrolled out of view, re-run the test command and paste what it prints.
- **Test plan**: exact commands and manual steps that exercise the change (start command, route/page, what to click, expected visible result) — a green test suite alone is not a plan.
- **Attribution**: `--author` names the model actually doing the work. Antigravity/agy sessions are ALWAYS `agy — Gemini 3.5 Flash (Medium)` or `(High)` — never write any other Gemini model name (models misremember their own identity; use this exact string).
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appersonautomotive.com",
"version": "3.1.0",
"version": "3.2.0",
"description": "appersonautomotive.com",
"main": "dist/index.html",
"repository": {
Expand Down
22 changes: 22 additions & 0 deletions src/App/AppTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,43 @@ export class AppTemplate extends Component<AppTemplateProps, AppTemplateState> {
}

mobileMenu() {
const labelStyle: React.CSSProperties = {
position: 'absolute', bottom: '15px', left: 0, right: 0, justifyContent: 'center', opacity: 0.6, pointerEvents: 'none',
};
const spanStyle: React.CSSProperties = {
fontSize: '13px', color: '#c0c0c0', fontFamily: 'Habibi, ChivoBlack, Arial, sans-serif',
};
return (
<div className="nav-list">
{this.callText()}
{this.addressBlock()}
{this.menus.map((menu, index) => this.makeMenuLink(menu, index))}
<div className="menu-item version-label" style={labelStyle}>
<span id="app-version" style={spanStyle}>
v{__APP_VERSION__}
</span>
</div>
</div>
);
}

navLinks(width: number) {
if (width < 1162) return this.mobileMenu();
const labelStyle: React.CSSProperties = {
position: 'absolute', bottom: '15px', left: 0, right: 0, justifyContent: 'center', opacity: 0.6, pointerEvents: 'none',
};
const spanStyle: React.CSSProperties = {
fontSize: '13px', color: '#c0c0c0', fontFamily: 'Habibi, ChivoBlack, Arial, sans-serif',
};
return (
<div className="nav-list">
{this.addressBlock()}
{this.menus.map((menu, index) => this.makeMenuLink(menu, index))}
<div className="menu-item version-label" style={labelStyle}>
<span id="app-version" style={spanStyle}>
v{__APP_VERSION__}
</span>
</div>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const __APP_VERSION__: string;
1 change: 1 addition & 0 deletions src/styles/_mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
top : 0;
right : 0;
width : 220px;
height : 100%;
margin : auto;
padding-top : 1px;
background-color: #505050;
Expand Down
12 changes: 12 additions & 0 deletions test/App/__snapshots__/App.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ exports[`App component > renders the component 1`] = `
</span>
</a>
</div>
<div
class="menu-item version-label"
style="position: absolute; bottom: 15px; left: 0px; right: 0px; justify-content: center; opacity: 0.6; pointer-events: none;"
>
<span
id="app-version"
style="font-size: 13px; color: rgb(192, 192, 192); font-family: Habibi, ChivoBlack, Arial, sans-serif;"
>
v
3.2.0
</span>
</div>
</div>
</div>
</div>
Expand Down
24 changes: 24 additions & 0 deletions test/App/__snapshots__/AppTemplate.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ exports[`AppTemplate > calls the mobile menu 1`] = `
</span>
</a>
</div>
<div
class="menu-item version-label"
style="position: absolute; bottom: 15px; left: 0px; right: 0px; justify-content: center; opacity: 0.6; pointer-events: none;"
>
<span
id="app-version"
style="font-size: 13px; color: rgb(192, 192, 192); font-family: Habibi, ChivoBlack, Arial, sans-serif;"
>
v
3.2.0
</span>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -399,6 +411,18 @@ exports[`AppTemplate > renders the component 1`] = `
</span>
</a>
</div>
<div
class="menu-item version-label"
style="position: absolute; bottom: 15px; left: 0px; right: 0px; justify-content: center; opacity: 0.6; pointer-events: none;"
>
<span
id="app-version"
style="font-size: 13px; color: rgb(192, 192, 192); font-family: Habibi, ChivoBlack, Arial, sans-serif;"
>
v
3.2.0
</span>
</div>
</div>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
/// <reference types="vitest" />
import { defineConfig, loadEnv, type Plugin } from 'vite';
import { fileURLToPath } from 'node:url';
import { readFileSync } from 'node:fs';
import react from '@vitejs/plugin-react';
import checker from 'vite-plugin-checker';

const srcDir = fileURLToPath(new URL('./src', import.meta.url));
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'));


const APP_ENV_KEYS = [
'BackendUrl',
Expand All @@ -31,6 +34,9 @@ export default defineConfig(({ mode }) => {
const env: Record<string, string> = { ...loadEnv(mode, process.cwd(), ''), NODE_ENV: mode };
const isTest = mode === 'test' || process.env.VITEST;
return {
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
plugins: [
...(isTest ? [] : [replaceProcessEnv(env), checker({ typescript: { tsconfigPath: './tsconfig.build.json' } })]),
react(),
Expand Down