Skip to content

Conversation

@open-swe
Copy link

@open-swe open-swe bot commented Aug 8, 2025

WORK IN PROGRESS OPEN SWE PR

Fixes: #1897

@open-swe open-swe bot added the open-swe label Aug 8, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

📝 Walkthrough

Walkthrough

This PR introduces a new AGENTS.md documentation file establishing centralized guidelines for the project. The file documents repository structure, service and component organization patterns, development workflows, testing procedures, formatting conventions, and infrastructure setup instructions across backend services and frontend components.

Changes

Cohort / File(s) Summary
Documentation & Guidelines
AGENTS.md
New documentation file containing repository structure overview, organizational rules for services/controllers/frontend components, dependency requirements, setup and development workflow instructions, testing procedures for backend/frontend/FwLite, formatting conventions, namespace guidelines, and migration guidance

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

This is a purely additive documentation file with no code logic or structural changes. Review focus should be:

  • Accuracy of stated conventions and organizational patterns
  • Completeness of setup and workflow instructions
  • Clarity of testing procedures and development guidelines

Possibly related issues

  • Issue #1897: Directly addresses creation of AGENTS.md repository guidelines documentation with matching scope and content intent
  • Issue #1899: Also targets AGENTS.md file creation with overlapping documentation objectives
  • Issue #1900: Establishes the same AGENTS.md repository guidelines document
  • Issue #1960: Involves creating AGENTS.md repository guidelines documentation
  • Issue #1895: Adds AGENTS.md repository guidelines with equivalent content purpose

Poem

🐰 A warren needs maps, not just warrens so deep,
Guidelines and pathways for coders to keep,
AGENTS.md hops in, with structures so clear,
Tests, builds, and workflows—conventions appear! 🌿

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: introducing a new AGENTS.md file with repository guidelines and development rules.
Description check ✅ Passed The description is minimal but relates to the changeset by referencing the issue being addressed and indicating WIP status.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch open-swe/964ccc0e-928c-45b0-bf99-576956d990a3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@myieye
Copy link
Collaborator

myieye commented Nov 28, 2025

@coderabbitai review Please review the agents.md for correctness/accuracy.

@myieye myieye marked this pull request as ready for review November 28, 2025 12:57
@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find and read the AGENTS.md file
fd -i "agents.md" --type f --exec cat {}

Length of output: 5286


🏁 Script executed:

#!/bin/bash
# Get repository structure overview to validate AGENTS.md content
echo "=== Repository root structure ==="
ls -la

echo -e "\n=== Backend structure ==="
fd . backend --max-depth 2 --type d | head -20

echo -e "\n=== Frontend structure ==="
fd . frontend --max-depth 2 --type d | head -20

echo -e "\n=== Key technology files ==="
fd -e csproj -e sln -e json --max-depth 2

Length of output: 3549


🏁 Script executed:

#!/bin/bash
# Check for existing documentation files
echo "=== Existing documentation ==="
fd -i "readme" --type f
fd -i "contributing" --type f
fd -i "\.md$" --max-depth 1 --type f

Length of output: 321


🏁 Script executed:

#!/bin/bash
# Check package.json and project files for technology stack validation
echo "=== Frontend package.json ==="
fd "package.json" frontend --max-depth 2 --exec head -50 {}

echo -e "\n=== Backend csproj files ==="
fd -e csproj backend --max-depth 3 | head -5
fd -e csproj backend --max-depth 3 --exec head -20 {} \; | head -50

Length of output: 4110


🏁 Script executed:

#!/bin/bash
# Verify specific paths mentioned in AGENTS.md
echo "=== Checking paths mentioned in AGENTS.md ==="

echo "Backend services path:"
ls -la backend/LexBoxApi/Services/ 2>/dev/null | head -10 || echo "Path not found"

echo -e "\nBackend controllers path:"
ls -la backend/LexBoxApi/Controllers/ 2>/dev/null | head -10 || echo "Path not found"

echo -e "\nFrontend components path:"
ls -la frontend/src/lib/components/ 2>/dev/null | head -10 || echo "Path not found"

echo -e "\nTesting directory:"
ls -la backend/Testing/ 2>/dev/null | head -10 || echo "Path not found"

echo -e "\nBackend projects listed:"
fd -e csproj . backend/LexBoxApi backend/FwHeadless backend/SyncReverseProxy backend/LexCore backend/LexData backend/FwLite --max-depth 1

Length of output: 2761


🏁 Script executed:

#!/bin/bash
# Check Taskfile.yml for mentioned commands
echo "=== Verifying Taskfile commands ==="
grep -E "^  (up|api|ui|test:unit|fw-lite-web|api:add-migration|api:db-update|ui:install|test:integration|ui:playwright-tests|setup):" Taskfile.yml

echo -e "\n=== Checking .editorconfig for backend formatting ==="
grep -A5 "\[*.cs\]" .editorconfig || grep -A5 "indent_size" .editorconfig | head -10

echo -e "\n=== Checking frontend formatting config ==="
cat frontend/package.json | jq '.scripts | {lint, format}'

Length of output: 337


🏁 Script executed:

#!/bin/bash
# Verify .NET version and other technology claims
echo "=== .NET version from global.json ==="
cat global.json

echo -e "\n=== Node/PNPM requirements from frontend package.json ==="
cat frontend/package.json | jq '{engines, packageManager}' | head -10

echo -e "\n=== Checking for Tiltfile ==="
head -20 Tiltfile

echo -e "\n=== Checking deployment structure ==="
ls -la deployment/ | head -15

Length of output: 1757


🏁 Script executed:

#!/bin/bash
# Check test framework and structure
echo "=== Backend test projects ==="
fd -e csproj . backend --exec grep -l "xUnit" {} \;

echo -e "\n=== Frontend test config files ==="
ls -la frontend/playwright.config.ts frontend/vitest.config.ts 2>/dev/null || echo "One or more test config files not found"

echo -e "\n=== Checking test categories in backend ==="
rg -n "Trait.*Category" backend/Testing/ --type cs | head -10

echo -e "\n=== Solution filter files ==="
cat FwLiteOnly.slnf | head -10

Length of output: 1667


🏁 Script executed:

#!/bin/bash
# Check for specific backend projects and structure
echo "=== LexBoxApi project structure ==="
fd . backend/LexBoxApi --max-depth 1 --type d

echo -e "\n=== FwHeadless project structure ==="
fd . backend/FwHeadless --max-depth 1 --type d

echo -e "\n=== Check if SyncReverseProxy exists ==="
ls -la backend/SyncReverseProxy/ 2>/dev/null || echo "SyncReverseProxy not found"

echo -e "\n=== LexCore and LexData ==="
ls -la backend/ | grep -E "LexCore|LexData"

echo -e "\n=== Frontend routes structure ==="
fd . frontend/src/routes --max-depth 2 --type d | head -15

Length of output: 2364


🏁 Script executed:

#!/bin/bash
# Check for all task commands mentioned in AGENTS.md
echo "=== All task commands in Taskfile.yml ==="
grep -E "^  [a-z0-9:-]+:" Taskfile.yml

echo -e "\n=== Checking for specific test and migration tasks ==="
grep -E "(test:unit|test:integration|api:add-migration|api:db-update|ui:install|ui:playwright-tests)" Taskfile.yml -A2

Length of output: 329


🏁 Script executed:

#!/bin/bash
# Check xUnit usage more carefully
echo "=== Checking for xUnit in Testing project ==="
fd -e csproj . backend/Testing --exec cat {} | grep -i "xunit\|test"

echo -e "\n=== Check Testing.csproj content ==="
cat backend/Testing/Testing.csproj 2>/dev/null || echo "Testing.csproj not found in backend/Testing/"

echo -e "\n=== Find any test project files ==="
fd "Testing.csproj" backend
fd ".Tests.csproj" backend --max-depth 3 | head -5

Length of output: 5139


🏁 Script executed:

#!/bin/bash
# Check frontend linting configuration details
echo "=== Frontend ESLint config ==="
cat frontend/eslint.config.js 2>/dev/null | head -40

echo -e "\n=== Viewer ESLint config ==="  
cat frontend/viewer/eslint.config.js 2>/dev/null | head -40

echo -e "\n=== Frontend Prettier config ==="
cat frontend/.prettierrc 2>/dev/null || cat frontend/prettier.config.js 2>/dev/null || echo "No Prettier config found"

Length of output: 2541


🏁 Script executed:

#!/bin/bash
# Check for vitest config in viewer and root
echo "=== Viewer vitest config ==="
ls -la frontend/viewer/vitest.config.ts 2>/dev/null && head -30 frontend/viewer/vitest.config.ts || echo "Not found in viewer"

echo -e "\n=== Root frontend vitest config ==="
cat frontend/vitest.config.ts 2>/dev/null || echo "Not found in frontend root"

echo -e "\n=== Check package.json for vitest ==="
cat frontend/package.json | jq '.devDependencies | with_entries(select(.key | contains("vitest")))'

Length of output: 1403


🏁 Script executed:

#!/bin/bash
# Verify GraphQL mention
echo "=== Check for GraphQL in LexBoxApi ==="
rg -n "GraphQL" backend/LexBoxApi/LexBoxApi.csproj | head -5
ls -la backend/LexBoxApi/GraphQL/ 2>/dev/null | head -5

echo -e "\n=== Check README for GraphQL mention ==="
rg -n "GraphQL" README.md

Length of output: 434


🏁 Script executed:

#!/bin/bash
# Check all task subcommands with colons
echo "=== All nested task commands ==="
cat Taskfile.yml | grep -E "^\s+[a-z0-9:-]+:" | head -50

echo -e "\n=== Search for test, migration, install commands ==="
rg -n "test:|migration|db-update|install|playwright" Taskfile.yml

Length of output: 1304


🏁 Script executed:

#!/bin/bash
# Check if there are nested taskfiles
echo "=== Check for nested Taskfiles ==="
fd -i "taskfile" --type f

echo -e "\n=== Check deployment Taskfile ==="
cat deployment/Taskfile.yml | grep -E "^\s+[a-z0-9:-]+" | head -30

Length of output: 1054


🏁 Script executed:

#!/bin/bash
# Check for lint configuration - look for 2-space indentation claim
echo "=== ESLint indentation rules ==="
rg -n "indent|tabWidth|indentSize" frontend/eslint.config.js frontend/viewer/eslint.config.js

echo -e "\n=== Prettier configuration ==="
cat frontend/.prettierrc

echo -e "\n=== Check for actual indentation in sample Svelte files ==="
head -20 frontend/src/lib/components/Badges/Badge.svelte 2>/dev/null || head -20 frontend/src/lib/components/ButtonToggle.svelte

Length of output: 727


🏁 Script executed:

#!/bin/bash
# Double-check the test category names used in actual tests
echo "=== Unique test categories in backend ==="
rg "Trait.*Category" backend/ --type cs -o | sort | uniq

echo -e "\n=== Sample test file with categories ==="
head -20 backend/Testing/LexCore/CrdtServerCommitTests.cs

Length of output: 2244


🏁 Script executed:

#!/bin/bash
# Check what GraphQL framework is used
echo "=== GraphQL packages in LexBoxApi ==="
rg -n "HotChocolate|GraphQL" backend/LexBoxApi/LexBoxApi.csproj -i

echo -e "\n=== Check for REST endpoints ==="
rg -n "MapControllers|UseRouting" backend/LexBoxApi/Program.cs | head -5

Length of output: 518


🏁 Script executed:

#!/bin/bash
# Check nested taskfiles for the missing commands
echo "=== Backend Taskfile commands ==="
cat backend/Taskfile.yml | grep -E "^\s+[a-z0-9:-]+:" | head -30

echo -e "\n=== Testing Taskfile commands ==="
cat backend/Testing/Taskfile.yml | grep -E "^\s+[a-z0-9:-]+:" | head -20

echo -e "\n=== Frontend Taskfile commands ==="
cat frontend/Taskfile.yml | grep -E "^\s+[a-z0-9:-]+:" | head -20

Length of output: 1810


🏁 Script executed:

#!/bin/bash
# Look for migration and database update commands
echo "=== Search for migration commands in backend Taskfile ==="
rg -n "add-migration|db-update|migration" backend/Taskfile.yml -A2

echo -e "\n=== Search for test commands ==="
rg -n "test:unit|test:integration|unit-with-db" backend/Testing/Taskfile.yml backend/Taskfile.yml -A2

Length of output: 1395


🏁 Script executed:

#!/bin/bash
# Check frontend taskfile for playwright tests
echo "=== Frontend Taskfile content ==="
cat frontend/Taskfile.yml

echo -e "\n=== Check if test commands are delegated ==="
rg -n "playwright|test" frontend/Taskfile.yml

Length of output: 2884


🏁 Script executed:

#!/bin/bash
# Verify correct usage of task delegation
echo "=== How to call delegated tasks ==="
echo "Example: Root Taskfile shows 'task test:' delegates to backend/Testing/Taskfile.yml"
echo ""
echo "Commands in backend/Testing/Taskfile.yml:"
cat backend/Testing/Taskfile.yml | grep -E "^\s+[a-z]" | head -15

echo -e "\n=== Commands in backend/Taskfile.yml ==="
cat backend/Taskfile.yml | grep -E "^\s+[a-z]" | head -20

Length of output: 892


🏁 Script executed:

#!/bin/bash
# Check the actual test category names used - get the actual values
echo "=== Actual test category values ==="
rg 'Trait\("Category",\s*"([^"]+)"\)' backend/ --type cs -o -r '$1' | sort | uniq -c | sort -rn

Length of output: 1814


@myieye I've thoroughly reviewed the AGENTS.md file by validating it against the actual repository structure and configuration files. Here are my findings:

Correct Information

The following sections are accurate:

  1. Repository Structure - All paths and project descriptions are correct
  2. Technology Stack - .NET 9.0, Node.js >=20, PNPM >=9, xUnit, Playwright, HotChocolate GraphQL all verified
  3. Directory Paths - All mentioned paths exist and are correctly described:
    • backend/LexBoxApi/Services/ and Controllers/
    • frontend/src/lib/components/
    • backend/Testing/
  4. Task Commands - The colon notation for nested tasks is correct (e.g., task api:add-migration, task ui:playwright-tests)
  5. Formatting Guidelines - Backend 4-space indentation for C# is correct; frontend uses single quotes and 120-char line width as stated

Inaccuracies Found

1. Test Categories - INCORRECT

Current text:

- Test organization: `backend/Testing/` with subdirectories by service/component

and

- Test Categories: Backend tests use attributes like `[Trait("Category", "Integration")]` to organize test execution

Issue: The document mentions categories as "(Unit, Integration, FlakyIntegration)" but actual categories found in the codebase are:

  • Integration (most common - 25+ occurrences)
  • FlakyIntegration (1 occurrence)
  • RequiresDb (8 occurrences)
  • Slow (2 occurrences)

Note: There is NO Unit category. Unit tests are simply tests without any category attribute - they run by default with task test:unit.

Suggested correction:

- Test Categories: Backend tests use `[Trait("Category", "...")]` attributes to organize test execution
  - `Integration` - Tests requiring full service integration
  - `FlakyIntegration` - Integration tests with known flakiness
  - `RequiresDb` - Tests requiring database infrastructure (run with `task test:unit-with-db`)
  - `Slow` - Long-running tests
  - No category attribute = Unit tests (run with `task test:unit`)

2. Vitest Configuration - MISLEADING

Current text:

- Unit Testing: Vitest for component and utility testing
  - Run: `pnpm run test:unit`
- Test files located in `frontend/tests/` and `frontend/viewer/tests/`

Issue: vitest.config.ts only exists in frontend/viewer/, not in the main frontend root directory. The main frontend uses Playwright for testing, not Vitest.

Suggested correction:

- Frontend Testing:
  - E2E Testing: Playwright for end-to-end browser tests
    - Run: `pnpm run test` or `task ui:playwright-tests`
    - Configuration: `playwright.config.ts`
    - Test files: `frontend/tests/`
- FwLite Viewer Testing:
  - Unit Testing: Vitest for component and utility testing
    - Run: `pnpm run test:unit` (from viewer directory)
    - Configuration: `frontend/viewer/vitest.config.ts`
    - Test files: `frontend/viewer/tests/`

3. Missing Important Commands

The document mentions task test:unit but doesn't mention task test:unit-with-db, which is crucial for running tests with the RequiresDb category. This should be added to the testing instructions.

Suggested addition:

- Run unit tests: `task test:unit` (excludes database and integration tests)
- Run unit tests with database: `task test:unit-with-db` (includes RequiresDb category)
- Run integration tests: `task test:integration`

4. Frontend Code Formatting - Minor Imprecision

Current text:

- Frontend: Use ESLint and Prettier (2-space indentation, single quotes, 120 char line width)

Issue: While the code does use 2-space indentation, this is not explicitly configured in .prettierrc - it's the JavaScript/TypeScript default. The Prettier config only specifies:

{
    "singleQuote": true,
    "printWidth": 120
}

Suggested correction:

- Frontend: Use ESLint and Prettier (single quotes, 120 char line width, default 2-space indentation for TypeScript/Svelte)

📝 Recommendations

  1. Add information about the test:unit-with-db command for database-dependent tests
  2. Clarify that Playwright's --ui flag is for interactive debugging: playwright test --ui
  3. Consider adding that FwLite tests use a separate solution filter: dotnet test FwLiteOnly.slnf
  4. The <pull_request_formatting> section is empty - should this be populated or removed?

Overall, the document is well-structured and mostly accurate. The main issues are around test categorization and Vitest configuration location. Would you like me to help generate a corrected version?

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89aa91c and 58b9a69.

📒 Files selected for processing (1)
  • AGENTS.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-31T15:58:56.761Z
Learnt from: imnasnainaec
Repo: sillsdev/languageforge-lexbox PR: 1867
File: platform.bible-extension/.eslintrc.js:29-29
Timestamp: 2025-07-31T15:58:56.761Z
Learning: In the sillsdev/languageforge-lexbox repository's platform.bible-extension, duplicate ESLint rules in .eslintrc.js files are intentional when part of the template system. The configuration uses a layered approach where rules are first defined in shared regions and then potentially overridden in later sections to allow for template inheritance with customization.

Applied to files:

  • AGENTS.md

Comment on lines +13 to +14
- Frontend: Use ESLint and Prettier (2-space indentation, single quotes, 120 char line width)
- Run `pnpm run lint` and `pnpm run format` for frontend code quality
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Adjust frontend indentation documentation to match actual Prettier configuration.

The documentation claims 2-space indentation is explicitly configured, but the PR's automated review noted that 2-space indentation is actually the Prettier default for TypeScript/Svelte files, not an explicit .prettierrc setting. The .prettierrc only explicitly sets singleQuote and printWidth (120 char).

Apply this diff to correct the indentation claim:

  - **Code Formatting**: 
    - Backend: Follow .NET conventions defined in `.editorconfig` (4-space indentation for C#)
-   - Frontend: Use ESLint and Prettier (2-space indentation, single quotes, 120 char line width)
+   - Frontend: Use ESLint and Prettier (single quotes, 120 char line width, default 2-space indentation for TypeScript/Svelte)

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In AGENTS.md around lines 13 to 14, the docs incorrectly state that 2-space
indentation is explicitly configured for the frontend; update the text to
reflect that the Prettier config only sets singleQuote and printWidth (120) and
that 2-space indentation is Prettier’s default for TypeScript/Svelte rather than
an explicit .prettierrc setting, and then adjust the sentence to remove the
claim of an explicit indentation setting while keeping the rest of the
lint/format instructions intact.

Comment on lines +66 to +70
- Framework: xUnit with categorized tests (Unit, Integration, FlakyIntegration)
- Run unit tests: `task test:unit` (excludes database and integration tests)
- Run integration tests: `task test:integration`
- Test organization: `backend/Testing/` with subdirectories by service/component
- Database tests require running infrastructure via `task test:unit-with-db`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Test categories list is incomplete and inaccurate.

The PR's automated review identified that the actual test categories in the repository differ from what's documented here. The repository uses Integration, FlakyIntegration, RequiresDb, and Slow category attributes, plus unit tests (no category attribute, run by default). The documentation currently omits RequiresDb and Slow, which are used in the codebase.

Apply this diff to correct the test categories:

- **Backend Testing**:
  - Framework: xUnit with categorized tests (Unit, Integration, FlakyIntegration)
+ **Backend Testing**:
+  - Framework: xUnit with categorized tests
+    - No category attribute: Unit tests (run by default with `task test:unit`)
+    - `Integration`: Integration tests (run with `task test:integration`)
+    - `FlakyIntegration`: Flaky integration tests
+    - `RequiresDb`: Tests requiring database (run with `task test:unit-with-db`)
+    - `Slow`: Slow-running tests

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In AGENTS.md around lines 66 to 70, the documented test categories are
incomplete: update the list to match the repository by replacing the current
categories with "Integration", "FlakyIntegration", "RequiresDb", and "Slow", and
clarify that unit tests have no category attribute and run by default; also
ensure the commands note that unit tests exclude database/integration tests and
that database tests require running infrastructure via `task test:unit-with-db`.

Comment on lines +70 to +71
- Database tests require running infrastructure via `task test:unit-with-db`
- **Frontend Testing**:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Clarify the distinction between unit, unit-with-db, and integration test commands.

The current text mentions task test:unit-with-db but doesn't clearly explain why or when to use each test command. Developers need to understand that test:unit-with-db is specifically for running tests marked with the RequiresDb trait.

Apply this diff to clarify the test command usage:

- **Backend Testing**:
  - Framework: xUnit with categorized tests (Unit, Integration, FlakyIntegration)
-  - Run unit tests: `task test:unit` (excludes database and integration tests)
+  - Run unit tests: `task test:unit` (excludes database, integration, and slow tests)
+  - Run database-dependent tests: `task test:unit-with-db` (runs tests marked with `RequiresDb`)

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In AGENTS.md around lines 70-71, the docs mention `task test:unit-with-db` but
don't explain the difference between test commands; update the text to clarify
that `task test:unit` runs pure unit tests, `task test:unit-with-db` runs unit
tests annotated with the RequiresDb trait against local/test DB infrastructure,
and `task test:integration` runs broader integration tests spanning services;
briefly state when to use each (use unit for fast isolated logic, unit-with-db
when a DB mock is insufficient and tests require real DB access, integration for
end-to-end scenarios) and include the `task test:unit-with-db` invocation note
about running infrastructure via `task test:unit-with-db`.

Comment on lines +75 to +77
- Unit Testing: Vitest for component and utility testing
- Run: `pnpm run test:unit`
- Test files located in `frontend/tests/` and `frontend/viewer/tests/`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Clarify Vitest scope and location in the frontend architecture.

The current documentation implies that Vitest is used for general frontend unit testing, but the automated review found that Vitest exists only in frontend/viewer/ for that specific viewer application. The main frontend uses Playwright for E2E testing. This distinction is critical for developers to understand which testing tool applies to different parts of the codebase.

Apply this diff to clarify the Vitest and testing split:

- **Frontend Testing**:
  - E2E Testing: Playwright for end-to-end browser tests
    - Run: `pnpm run test` or `task ui:playwright-tests`
    - Configuration: `playwright.config.ts`
-  - Unit Testing: Vitest for component and utility testing
+  - Unit Testing: Vitest for FwLite viewer component and utility testing
    - Run: `pnpm run test:unit`
+    - Note: Vitest is configured in `frontend/viewer/` for the separate viewer application
+    - Main frontend components use Playwright for E2E testing; no dedicated unit test framework for general components

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In AGENTS.md around lines 75 to 77, the documentation incorrectly implies Vitest
is used across the frontend; update the text to explicitly state that Vitest is
only used for unit testing in frontend/viewer/ (with test files in
frontend/viewer/tests/ and run via pnpm run test:unit from that package), and
note that the main frontend uses Playwright for end-to-end testing (with its own
test commands and locations), so readers understand the split between Vitest
(viewer unit tests) and Playwright (main frontend E2E).

Comment on lines +85 to +86
<pull_request_formatting>
</pull_request_formatting>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove or fill the empty <pull_request_formatting> section.

The section is empty and provides no guidance to developers. Either add content describing pull request formatting conventions or remove the section entirely.

Consider either:

  1. Adding PR formatting guidelines (commit message conventions, PR title/description format, change documentation, etc.), or
  2. Removing the empty section entirely.
-<pull_request_formatting>
-</pull_request_formatting>

or fill with appropriate content about PR conventions.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<pull_request_formatting>
</pull_request_formatting>
🤖 Prompt for AI Agents
In AGENTS.md around lines 85-86 the <pull_request_formatting> section is empty;
either remove that empty section tag or replace it with a concise PR formatting
guideline. If removing, delete the tag and any surrounding placeholder text; if
filling, add a short checklist describing expected PR title format, description
template, commit message style, required changelog/labels, reviewers, and
testing/CI requirements. Ensure whichever option you choose keeps the file
consistent with surrounding Markdown structure and references.

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.

3 participants