> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/codebase.md).

# App Code

The **App Code** section — a top-level entry in the navigation rail — maps your connected source repository's files and app areas against which UI tests exercise them, so the parts of your app that nothing tests surface first.

{% hint style="info" %}
App Code was previously labeled **Codebase**. Old links and bookmarks to `/codebase` still work.
{% endhint %}

## Browse The Code

App Code reads your source repository like a GitHub code tab. Drill into folders with the breadcrumb, or jump straight to a file from the file-tree sidebar. Folders are listed A–Z by default; flip the **Gaps first** toggle to surface untested code at the top. Turn on **Only gaps** to hide everything except untested files, and use the search box to filter files across the whole tree.

## Per-File Coverage

Expand any file to see its **Tested by** panel — the features that map to it, each with its last-run pass or fail status and an Open link. Mapping comes from two sources: the AI's automatic file-to-area matching, and an explicit `@covers:` tag on a Gherkin scenario (for example `@covers:Services/CheckoutService`) that links that scenario straight to a source file — add a path qualifier when a bare class name matches more than one file in your repo, otherwise the tag is left unmapped rather than guessed. If a mapping is wrong, correct it inline: remove a stale link or map a test yourself. Your corrections are sticky and survive re-scans.

## Metrics And Trend

Each file and folder reports an executed-vs-tested rollup, and the hero shows an executed-lines trend as a sparkline so you can see coverage moving over time. Coverage runs collect real executed-line data for **.NET** (`dotnet test`) and **Node.js** (`node --test` / equivalent) projects; other stacks still get the structural files/areas/gaps mapping without an executed-lines number.

## Branches And New Code

Pick the branch to inspect. On a feature branch, App Code highlights files that are new in that branch and flags the new ones that nothing tests yet — so you catch missing coverage before you merge.

## How Areas Are Derived

An AI scan reads your source to detect the stack and infer route-grounded app areas (for example "Checkout" or "Login"), grounding them against URLs your app actually serves rather than guessing. Features are auto-mapped to those areas, and you can re-map by hand.

## Before You Start

App Code needs a connected source repository. Connect one under **Settings → App Repository**, then run a scan to populate files, areas, and coverage. Coverage-collection runs execute in TestVibe's cloud sandboxes, the same fleet that runs your Playwright tests.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.testvibe.com/codebase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
