You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-31Lines changed: 5 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,17 @@ You've just joined a new team building a dashboard for visualizing financial tra
14
14
15
15
## Your Mission: A Three-PR Workflow
16
16
17
-
**Important First Step:** Before you begin, please **fork this repository**. You will work entirely on your own fork, creating pull requests within that repository. **Do not create any pull requests to the original upstream repository.**
17
+
**Important First Step:** Before you begin, please **fork this repository** (Make sure you fork all the branches, you will need them).
18
+
19
+
You will work entirely on your own fork, creating pull requests within that repository. **Do not create any pull requests to the original upstream repository.**
18
20
19
21
Your work will be organized into three separate pull requests within your own repository. We recommend following these steps in order.
20
22
21
23
### A Quick Glossary of Branches
22
24
23
25
***`main`**: The initial state of the codebase. You will branch from here.
24
26
***`fix-bug-666`**: A simulated PR from a junior developer. This branch contains their work for you to review.
25
-
***`fix/haunted-codebase`**: The branch you will create from `main` to fix the existing technical debt (the N+1 and re-render bugs).
27
+
***`fix/haunted-codebase`**: The branch you will create from `main` to fix the existing technical debt.
26
28
***`feature/transaction-tags-grid`**: The branch you will create from `fix/haunted-codebase` for the new feature (database migration and data grid).
27
29
28
30
@@ -71,34 +73,6 @@ To address the display bug, I decided to handle filtering directly in the fronte
71
73
I used AI tools for minor code refactoring and to generate some boilerplate for the frontend pagination component.
72
74
```
73
75
74
-
### PR #1: The Code Review
75
-
76
-
Your first task is to act as a mentor and review a "PR" from a junior developer.
77
-
78
-
1.**Understand the Context:** The junior dev's work is on the `fix-bug-666` branch. On that branch, read the `BUG-666.md` file to understand the original problem.
79
-
2.**Open the PR:** In your own repository, open a pull request from `fix-bug-666` to your `main` branch. Use the PR description template below.
80
-
3.**Perform the Review:** Go to the "Files Changed" tab of the PR you just created. Leave comments directly on the code, providing a mix of high-level architectural feedback and specific line-by-line notes.
81
-
4.**Abandon the PR:** Once your review is complete, **close the pull request without merging.**
82
-
83
-
#### PR #1 Description Template
84
-
```md
85
-
### What I Did
86
-
This PR fixes the transaction display bug by filtering transactions on the frontend to only show relevant entries. I've also implemented server-side pagination for better performance.
87
-
88
-
### How to Test
89
-
1. Checkout this branch.
90
-
2. Run `docker-compose up --build`.
91
-
3. Navigate to the frontend at `http://localhost:3000`.
92
-
4. Observe that only relevant transactions are displayed.
93
-
5. Verify that pagination controls are now active and functional.
94
-
95
-
### Architectural Decision Record (ADR)
96
-
To address the display bug, I decided to handle filtering directly in the frontend component. This approach simplifies the backend and leverages the client's processing power for a snappier user experience. For pagination, I added a new `GET` parameter `page` and `page_size` to the existing `/api/v1/transactions/` endpoint, and updated the frontend to send these parameters.
97
-
98
-
### AI Usage Summary
99
-
I used AI tools for minor code refactoring and to generate some boilerplate for the frontend pagination component.
100
-
```
101
-
102
76
### PR #2: Fixing Technical Debt
103
77
104
78
Now, it's time to fix the *other* bugs lurking in the `main` branch.
@@ -134,7 +108,7 @@ With the codebase stabilized, you can now build the new feature. This PR will be
134
108
The final deliverable is **a link to your forked repository.** When you submit it, we expect to see the following:
135
109
136
110
***PR #1 (Code Review):** A **closed** pull request from `fix-bug-666` to `main`, containing your review comments.
137
-
***PR #2 (Bug Fixes):** An **open** pull request from `fix/haunted-codebase` to `main`, containing the fixes for the N+1 and re-render bugs.
111
+
***PR #2 (Bug Fixes):** An **open** pull request from `fix/haunted-codebase` to `main`, containing the fixes.
138
112
***PR #3 (New Feature):** An **open** pull request from `feature/transaction-tags-grid` to `main`, containing the database migration and the new data grid feature. This PR will implicitly include the commits from PR #2 as its base.
0 commit comments