Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
af5125f
docs(specs): create spec
remarkablemark Feb 27, 2026
659919d
docs(specs): fix date
remarkablemark Feb 27, 2026
947a501
test: move setupTests from test to src
remarkablemark Feb 27, 2026
9b8d9f4
docs(specs): clarify scrolling
remarkablemark Feb 27, 2026
95f4110
docs(specs): remove horizontal scrolling
remarkablemark Feb 27, 2026
78dcf90
docs(specs): clarify line gutter
remarkablemark Feb 27, 2026
340a798
docs(specs): clarify digits
remarkablemark Feb 27, 2026
1178a4b
docs(specs): clarify min and max digits
remarkablemark Feb 27, 2026
3a9092b
docs(specs): clarify no diff
remarkablemark Feb 27, 2026
24d809d
docs(specs): create plan
remarkablemark Feb 27, 2026
4c7b551
docs(specs): fix project structure
remarkablemark Feb 27, 2026
c3b0636
docs(specs): use Tailwind
remarkablemark Feb 27, 2026
f8d5b95
docs(specs): generate tasks
remarkablemark Feb 27, 2026
2dfdfbe
docs(specs): remove unnecessary requirement
remarkablemark Feb 27, 2026
3fdb920
chore: complete foundational work
remarkablemark Feb 27, 2026
d00340e
feat: complete User Story 1 - Synchronized Line Number Scrolling
remarkablemark Feb 27, 2026
ee16006
test(DiffViewer): fix act warning
remarkablemark Feb 27, 2026
5857cc3
test(App): remove duplicate tests
remarkablemark Feb 27, 2026
7366e8f
fix(TextInput): add horizontal scrolling
remarkablemark Feb 27, 2026
7012db9
docs(specs): update spec
remarkablemark Feb 27, 2026
5df4fb5
docs(specs): update tasks
remarkablemark Feb 27, 2026
50fc720
docs(specs): remove optional tasks
remarkablemark Feb 27, 2026
bf5e834
docs(specs): mark previous specs complete
remarkablemark Feb 27, 2026
4d7dae9
fix(components): set min-height to textarea
remarkablemark Feb 27, 2026
6c63886
fix: add padding bottom to line number when horizontal scollbar appears
remarkablemark Feb 27, 2026
3a73481
docs(specs): update spec
remarkablemark Feb 27, 2026
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
6 changes: 4 additions & 2 deletions .windsurf/rules/specify-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Auto-generated from all feature plans. Last updated: 2026-02-07

## Active Technologies

- TypeScript 5 (strict mode) + React 19, Vite 7, Vitest 4, @testing-library/react, @testing-library/user-even (001-fix-line-number-scrolling)

- TypeScript 5, React 19 + `diff` npm package (diffChars, diffWords, diffLines), React hooks (003-diff-line-numbers)
- N/A (client-side only) (003-diff-line-numbers)

Expand Down Expand Up @@ -32,11 +34,11 @@ TypeScript 5.9.3 (strict mode): Follow standard conventions

## Recent Changes

- 001-fix-line-number-scrolling: Added TypeScript 5 (strict mode) + React 19, Vite 7, Vitest 4, @testing-library/react, @testing-library/user-even

- 003-diff-line-numbers: Added TypeScript 5, React 19 + `diff` npm package (diffChars, diffWords, diffLines), React hooks

- 002-toggle-diff-options: Added TypeScript 5 (strict mode) + React 19, `diff` npm package (already installed — exports `diffChars`, `diffWords`, `diffLines`)

- 001-text-diff: Added TypeScript 5.9.3 (strict mode) + React 19.2.4, `diff` (npm — to be added as runtime dependency)

<!-- MANUAL ADDITIONS START -->
<!-- MANUAL ADDITIONS END -->
33 changes: 16 additions & 17 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ You're an expert engineer for this React app.
- Prettier with Tailwind plugin
- React Compiler (babel-plugin-react-compiler)
- **File Structure:**
- `public/` – app assets
- `src/` – app code
- `test/` – test setup
- `public/` – assets
- `src/` – features, types, tests

## Commands you can use
## Commands

### Build & Development

- **Build:** `npm run build` (TypeScript compile + Vite build, outputs to dist/)
- **Build:** `npm run build` (Vite build, outputs to `dist/`)
- **Start:** `npm start` (starts dev server at http://localhost:5173, opens browser)
- **Preview:** `npm run preview` (preview production build locally)

### Code Quality

Expand All @@ -44,13 +42,13 @@ You're an expert engineer for this React app.

### Testing

- **Coverage:** `npm run test:ci` (run tests with coverage report, requires 100% coverage)
- **Coverage:** `npm run test:ci` (run tests with coverage report)
- **Single test file:** `npm test -- path/to/test.test.tsx` (run specific test file)
- **Single test with coverage:** `npm run test:ci -- path/to/test.test.tsx`

## Code Style Guidelines
## Code Style

### Import Organization (Enforced by eslint-plugin-simple-import-sort)
### Import Order (Enforced by eslint-plugin-simple-import-sort)

1. External libraries (react, react-dom, etc.)
2. Internal modules (absolute imports starting with src/)
Expand Down Expand Up @@ -91,13 +89,14 @@ import type { User } from './types';
- **Destructure props** in function signature for clarity
- **Semantic HTML** - use proper tags (header, nav, main, button, etc.)
- **Accessibility first** - include proper ARIA labels, alt text, keyboard navigation
- **No manual optimization** - React Compiler handles memoization automatically, avoid `useMemo` and `useCallback`

### CSS & Styling

- **Tailwind CSS only** - no custom CSS files unless absolutely necessary
- **Responsive design** - use Tailwind responsive prefixes (sm:, md:, lg:)
- **Component variants** - use Tailwind's utility classes with consistent patterns
- **Dark mode support** - use dark: prefix when needed
- **Dark mode support** - use `dark:` prefix when needed

### Error Handling

Expand All @@ -108,13 +107,16 @@ import type { User } from './types';

### Testing Standards

- **100% coverage required** - all statements, branches, functions, and lines
- **TDD** - tests MUST be written first and validated before implementation (red, green, refactor)
- **100% coverage required** - all statements, branches, functions, and lines (except for barrel exports)
- **Do not test barrel exports** - index.ts files are barrel exports and should not have dedicated tests
- **Testing Library** - use @testing-library/react for component testing
- **User interactions** - use @testing-library/user-event for simulating user actions
- **Mock external dependencies** - mock API calls, browser APIs, etc.
- **Descriptive test names** - should clearly state what is being tested
- **Vitest globals** - use `vi.fn()`, `vi.mock()`, `vi.clearAllMocks()`
- **Test setup** - global test environment configured in `vite.config.mts` with `globals: true`
- **Coverage exclusions** - Use `/* v8 ignore next -- @preserve */` for a single line that is not testable or `/* v8 ignore start */` and `/* v8 ignore end */` for multiple lines that are not testable

### Code Quality Rules

Expand All @@ -137,19 +139,16 @@ src/components/ComponentName/

### Import Aliases

- `src/` maps to absolute imports (`src/components/App` → `src/components/App`)
- `test/` maps to test utilities (`test/mocks/api` → `test/mocks/api`)
- `src/` maps to absolute imports

## Boundaries

- ✅ **Always:** Write to `src/`; run lint, type check, and tests before commits; follow naming conventions
- ⚠️ **Ask first:** Adding dependencies, modifying CI/CD config, changing build configuration
- ⚠️ **Ask first:** Adding dependencies, modifying CI/CD config, changing build configuration, editing dot files
- 🚫 **Never:** Commit secrets or API keys, edit `node_modules/`, disable ESLint rules, commit with failing tests

## Development Notes

- **Vite Integration:** This project uses Vite for dev server and build
- **Modern React:** Uses React 19 with concurrent features and the new React Compiler
- **ESM Only:** Project is configured as ES modules (`"type": "module"` in package.json)
- **Git Hooks:** Husky + lint-staged enforce code quality on commits
- **Commit Messages:** Conventional commits enforced by commitlint
- **Commit Messages:** Conventional Commits enforced by commitlint
35 changes: 35 additions & 0 deletions specs/001-fix-line-number-scrolling/checklists/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Specification Quality Checklist: Fix Line Number Scrolling

**Purpose**: Validate specification completeness and quality before proceeding to planning
**Created**: 2026-02-26
**Feature**: [spec.md](./spec.md)

## Content Quality

- [x] No implementation details (languages, frameworks, APIs)
- [x] Focused on user value and business needs
- [x] Written for non-technical stakeholders
- [x] All mandatory sections completed

## Requirement Completeness

- [x] No [NEEDS CLARIFICATION] markers remain
- [x] Requirements are testable and unambiguous
- [x] Success criteria are measurable
- [x] Success criteria are technology-agnostic (no implementation details)
- [x] All acceptance scenarios are defined
- [x] Edge cases are identified
- [x] Scope is clearly bounded
- [x] Dependencies and assumptions identified

## Feature Readiness

- [x] All functional requirements have clear acceptance criteria
- [x] User scenarios cover primary flows
- [x] Feature meets measurable outcomes defined in Success Criteria
- [x] No implementation details leak into specification

## Notes

- Specification is complete and ready for planning phase
- All validation criteria met successfully
Loading