On this page
Post 01 left me with a working full-stack baseline: PostgreSQL data flowing through a Spring Boot API into an Angular screen, with backend tests passing and the application running end to end.
For Post 02, Codex had to extend that repository rather than start from scratch. I chose transaction category filtering. Categories already existed in the data model, but the feature still crossed the persistence query, HTTP API, Angular state, and verification setup. The choices had to come from backend data, filtering had to happen before the recent-transaction limit, and selecting a category could not disturb the account summary.
I framed the work as a structured engineering task with required behavior, verification expectations, and explicit non-goals, then reviewed what Codex actually delivered.
The repository checkpoints are available here:
- Starting point:
post-01, commit3dbbde080b91cfc3521d2169e3a665b0ad6bc52d - Final implementation:
post-02, commit7741daff30c0acb96ffa3a4c4e64051b2d523c18 - Repository diff:
post-01...post-02
The application remains an engineering test bench using fictional financial data. It is not a production product and has no real users.
This is not a controlled comparison with Post 01. That task started from an almost empty repository; this one started with code, conventions, and runnable behavior already in place. The question here is narrower: did this task produce a focused change that was straightforward to inspect and carry forward?
The task
The category already existed on each transaction, so the task required no new product concept or schema migration. It did require coordinated changes across the persistence query, HTTP API, Angular state, interaction behavior, tests, and documentation.
This is the exact prompt I gave Codex Desktop in the public application repository:
Extend the existing personal finance snapshot with category filtering for recent transactions.
Starting point: this repository already has the first working slice from the `post-01` state:
- Spring Boot backend under `backend/`
- Angular frontend under `frontend/`
- PostgreSQL local setup in `docker-compose.yml`
- read-only accounts and recent transactions APIs
- fictional seed data loaded by Flyway
Please inspect the repository before editing and briefly tell me your implementation plan.
Feature goal:
- The UI should let me view recent transactions for all categories or for one selected category.
- The available category choices should come from the backend/data, not from a hard-coded frontend-only list.
- The default view should still show all recent transactions.
- Selecting a category should update the recent transaction list without changing the account summary.
- Keep the behavior read-only.
Backend expectations:
- Add the minimal API/query support needed for category filtering.
- Keep API responses as DTOs rather than exposing JPA entities directly.
- Preserve the existing recent transaction limit behavior or explain any small adjustment you make.
- Add or update backend tests for the new category behavior.
Frontend expectations:
- Reuse the existing Angular application structure unless the task clearly justifies a small extraction.
- Add a simple, accessible category filter control.
- Preserve the existing loading and error behavior.
- Keep the UI compact; this is still an early snapshot screen, not a full finance dashboard.
Verification expectations:
- Run the relevant backend tests.
- Run the frontend production build.
- Inspect the verification mechanisms exposed by the existing repository, including package scripts and README check commands.
- Ensure the relevant verification commands are meaningful for this change and that documented check commands are accurate.
- Add or update lightweight frontend verification for the new interactive behavior if that is reasonable for the current Angular setup, without turning this into a broad frontend testing overhaul.
- Update scripts or README check instructions if you find they are inaccurate or no longer match the repository.
Scope boundaries:
- Do not add authentication.
- Do not add budgets.
- Do not add CSV imports.
- Do not add reporting or analytics.
- Do not add transaction creation or editing.
- Do not add category management screens.
- Do not add CI/CD.
- Do not add AGENTS.md or Codex-specific repository instructions.
- Do not introduce skills, MCP configuration, specialized agents, or delegated workflow setup.
The prompt is longer than the one used for the first slice, but it is not an implementation design. It provides the context, required behavior, constraints, checks, and boundaries I would expect in an ordinary engineering task without prescribing endpoint names, repository methods, Angular state primitives, component boundaries, or a test framework.
What Codex planned
After inspecting the repository, Codex proposed four steps:
- Add an optional category parameter to the recent-transactions endpoint and expose categories derived from transaction data.
- Preserve DTO responses and cover unfiltered, filtered, unknown-category, and category-list behavior in backend tests.
- Add an accessible selector that reloads transactions without reloading accounts.
- Add focused frontend interaction tests, repair the frontend test setup if necessary, then run the backend tests, frontend tests, build, and diff checks.
The plan fit the task and existing architecture. Its frontend step was explicitly about interaction-level verification: selecting a category, not merely constructing an HTTP query. The delivered tests ended up narrower.
No clarification or follow-up prompt was needed. Codex completed the implementation in one task.
The backend change
TransactionController now accepts an optional category while preserving the existing limit clamp and deterministic ordering:
var transactions = category == null || category.isBlank()
? transactionRepository.findAll(page)
: transactionRepository.findByCategory(category.trim(), page);
return transactions
.stream()
.map(TransactionResponse::from)
.toList();
The repository query filters by category before the PageRequest applies the limit. It does not fetch the eight most recent transactions and then discard rows from other categories in memory.
TransactionRepository adds the filtered query and a distinct category query:
@EntityGraph(attributePaths = "account")
Page<FinancialTransaction> findByCategory(String category, Pageable pageable);
@Query("select distinct transaction.category from FinancialTransaction transaction order by transaction.category")
List<String> findDistinctCategories();
The category endpoint maps those strings into CategoryResponse records. The API still returns DTOs rather than persistence entities, and the existing account-fetch behavior remains explicit for transaction responses.
The backend tests cover four relevant paths:
- the original unfiltered recent-transactions request;
- filtering before applying a limit;
- an unknown category returning an empty array;
- distinct categories returned in name order.
There was no database migration and no seed-data change. The feature uses the category values already stored on transactions.
The frontend change
The Angular change introduces the first real interaction on the snapshot screen.
Codex moved the root component out of main.ts into app.component.ts. The extraction is proportionate: main.ts becomes a small bootstrap file, while the component owns the screen’s template, local state, and HTTP interaction.
The component loads accounts, categories, and the initial unfiltered transactions. Selecting a category changes only the transaction request:
selectCategory(event: Event): void {
const category = (event.target as HTMLSelectElement).value;
this.selectedCategory.set(category);
this.transactionsLoading.set(true);
this.error.set(null);
this.loadTransactions(category)
.catch(() => {
this.error.set('Could not load recent transactions. Please try another category.');
})
.finally(() => this.transactionsLoading.set(false));
}
Accounts are still loaded only during component initialization. The computed balance depends only on the account signal, so transaction filtering does not recalculate or replace the account summary.
The selector is a native <select> with an associated <label>, an “All categories” option, a visible focus style, and a disabled state while transactions reload. The component also includes loading, error, and empty-result branches.

Codex kept the change within the single-screen Angular application. It added no state-management library, service hierarchy, routing, or unnecessary component tree.
Finding and repairing the broken test command
The category query was straightforward. The frontend test setup was not.
At post-01, package.json exposed this:
"test": "ng test"
The Angular workspace did not define a test target, so the command failed.
Codex found that mismatch while inspecting the repository. I already knew about the inherited defect, but the application-side task did not identify it; it only asked Codex to inspect the available verification mechanisms.
Codex initially intended to add Angular interaction tests and attempted a Vitest-based setup. When the dependency installation failed, it switched to Node’s built-in test runner rather than leaving the command broken or replacing it with a no-op:
"test": "node --test src/**/*.test.js"
It extracted the request-parameter construction into a tiny module:
export function recentTransactionQuery(category) {
return category
? { limit: 8, category }
: { limit: 8 };
}
To keep that command portable without adding another test dependency, Codex implemented the helper and test in JavaScript. A declaration file keeps the Angular import typed:
export function recentTransactionQuery(category: string): Record<string, string | number>;
Codex got npm test working, but not in the way it originally planned. The Angular component now imports a JavaScript helper while TypeScript relies on a separate declaration file that can drift from the implementation.
What verification demonstrated
Codex reported these final checks:
./mvnw test — 6 tests passed
npm test — 2 tests passed
npm run build — production build succeeded
git diff --check — clean
A separate AI review session reran and confirmed all four results.
The backend tests provide useful integration evidence. They exercise Spring MVC, Flyway, JPA, DTO mapping, filtered-before-limit behavior, unknown categories, and category discovery against the test database.
The Angular production build proves that the component, JavaScript helper, and declaration file compile and bundle together. The two Node tests cover request-query construction: one asserts that an empty category produces { limit: 8 }, and the other that a selected category adds category: "Groceries". The separate AI review session confirmed that both execute and pass.
They do not instantiate the Angular component or exercise rendering, selection events, HTTP interaction, loading and error behavior, preservation of the account summary, or the empty-state presentation. Manual verification confirmed that the application worked end to end, category filtering and switching worked, the account summary remained unchanged, and a direct request with a nonexistent category returned an empty array.
The empty-state branch exists in the component, but its presentation was not manually verified because every category in the available data had at least one transaction.
I did not treat the missing interaction coverage as a reason to expand this task into a frontend testing overhaul. The Node tests are cheap and deterministic, and the production build and browser check add useful evidence. The repository still has utility-level frontend automation, not component-level verification.
What code inspection found after the checks passed
The final post-01...post-02 diff changes 12 files, with 303 insertions and 156 deletions. Much of the deletion count comes from moving the root component out of main.ts, not from removing behavior. There was no schema or seed-data change, lockfile dependency addition, Docker change, or application-wide architecture shift.
The backend change fits the existing structure, the frontend extraction is proportionate, and the implementation stayed within scope. Code inspection also identified a low-severity request-state risk.
The component starts accounts, categories, and transactions with Promise.all. If one startup request fails early, Promise.all rejects and the global loading state is cleared even though another startup request may still be running. Under a specific partial-failure timing, the category selector can become available while the original unfiltered transaction request is still in flight. A filtered request can then overlap it, and the last response wins.
The same path can clear a startup error when the user selects a category, even if the account request never recovered.
This scenario comes from code inspection; it was not reproduced. It is not the normal category-switching path: during successful operation, the selector is disabled while a filtered transaction request is active, so ordinary rapid changes are serialized. The race requires a partial startup failure and particular response timing.
I accepted the implementation with this credible, code-supported risk recorded rather than expanding the task into a frontend state-management refactor. It does not invalidate the observed category-filter behavior, but it remains a limitation of the accepted implementation.
What I am carrying forward
Codex produced a focused, working full-stack change and completed it without a follow-up prompt. The task stated where categories came from, when the limit applied, what behavior had to remain unchanged, which verification to inspect, and what stayed out of scope. That made it easier to check whether Codex had actually delivered what I asked for.
Delegating the implementation required a clear task. Accepting the result required something else: inspecting the diff, running the checks, exercising the application, and understanding exactly what the passing tests did not prove.