Conversation
leekahung
left a comment
There was a problem hiding this comment.
Hey Alan, thanks for making the home page! Here are some feedback related to the changes.
|
@claude can you perform a PR check as well? |
|
Claude finished @leekahung's task in 1m 53s —— View job PR Check — Homepage (#305)
Nice work getting a homepage up! Here are issues I found beyond what @leekahung already caught — prioritized by severity. 🐛 Bug: Form submission not prevented
// current — broken
<button type="submit" className="btn-hover" style={styles.formSubmit}
onClick={() => {
setTimeout(() => {
sendHPFeedback(name, subject, feedback);
}, 1000);
}}>Submit</button>This should be restructured: use 🐛 Bug: Wrong import paths in HP.tsx
// wrong
import BeaverIcon from '../src/shared/components/BeaverIcon';
import TenantFirstAidLogo from "../src/shared/components/TenantFirstAidLogo";
// correct
import BeaverIcon from './shared/components/BeaverIcon';
import TenantFirstAidLogo from './shared/components/TenantFirstAidLogo';
|
|
Converted most of the styles to Tailwind- only the styles relating to transitions in the carousel (lines 32-42) in the homepage remain css~ otherwise gave the homepage its own folder, & removed the html blob from the form :) |
leekahung
left a comment
There was a problem hiding this comment.
Hey Alan, thanks for the changes! I've requested a few more changes, largely related to styling and implementation, see feedback.
| const roadmapItems = [ | ||
| {title: "Ask questions", desc: "Chat with Brainy about your housing issues.", status: "complete", id: "chat"}, | ||
| {title: "Write letters", desc: "Brainy can help draft letters to your landlord.", status: "active", id: "letter"}, | ||
| ]; |
There was a problem hiding this comment.
Similar to letterImages, we can refactor this out of the component
There was a problem hiding this comment.
Refactoring out of the component does not necessary mean out of the component file, both the list and the component can be defined separately in the file with the component referencing the list.
There was a problem hiding this comment.
can you explain why you're removing it and whether there is a visual/no visual change with regards to this change?
| import Chat from "./Chat"; | ||
| import LoadingPage from "./pages/LoadingPage"; | ||
| import PageLayout from "./layouts/PageLayout"; | ||
| import HomePage from "./pages/HomePage/HomePage"; |
There was a problem hiding this comment.
Not really an issue and it's not urgent, but I want to keep a note that we'll probably want to move the other pages like Chat, Letter, About, etc. into the pages directory similar to what is being done with HomePage to keep the root directory of frontend to just configs, styling files, main.tsx, and App.tsx
|
@claude can you do another review? |
|
Claude finished @leekahung's task in 2m 17s —— View job PR Review — Homepage (#305)
Good progress on this iteration! The file structure is much better, the form submission bug is fixed, and import paths are corrected. Here's what's still open from @leekahung's second review plus a few new things I caught. Still open from @leekahung's review
|
| Current | Simplified |
|---|---|
w-[12px] |
w-3 |
z-[1] |
z-1 |
z-[2] |
z-2 |
z-[3] |
z-3 |
z-[30] |
z-30 |
z-[10] |
z-10 |
Reserve [...] syntax for values that have no Tailwind equivalent (custom hex colors, clamp(...), complex shadows, the responsive selector hack on line 208).
❓ DisclaimerLayout.tsx — why was <p> removed?
The diff shows the wrapping <p> tags were removed. This is a shared component used elsewhere in the app. Removing the block-level <p> changes spacing behavior anywhere DisclaimerLayout is rendered. Can you explain the motivation? If the homepage doesn't use DisclaimerLayout at all, the change should be reverted to avoid unintended side effects on other pages.
New issues
🐛 Carousel map uses index as key instead of img.id
HomePage.tsx:141 — The map parameter is (img, id) where id is the numeric index, not img.id. This uses an array index as a React key, which is what the previous review flagged:
// current — uses array index
{letterImages.map((img, id) => (
<div key={id} ...>
// fix — use the stable id field you already defined
{letterImages.map((img) => (
<div key={img.id} ...>🐛 PageLayout clips the homepage
PageLayout.tsx:10 — isChatPages is true for pathname === "/", which means the homepage gets h-dvh (100% viewport height). This will clip all the content below the fold since the page can't scroll. This needs either a fix in PageLayout to not treat / as a chat-style page, or the homepage needs to opt out. Fix this →
📝 Empty <p> tag in hero section
HomePage.tsx:64 — <p className="mt-[25px] ..."></p> renders nothing. It should either be populated with content or removed.
📝 clsx used with single static strings
HomePage.tsx:92,94,103,107 — clsx("flex gap-[30px]") with a single string is just noise; clsx adds value only when you have conditional or multiple classes. Use plain className="..." there.
📝 roadmapItems.status field is unused
HomePage.tsx:27-29 — Each roadmap item has a status: "complete" | "active" field, but the rendering logic doesn't read it — it uses i === 0 to decide whether to show the connector line. Either use the status field in the rendering, or remove it.
📝 mainRef is defined but never used for anything
HomePage.tsx:18 — const mainRef = useRef(null) is attached to the root div but never read or passed anywhere. Remove it. Fix this →
📝 Form inputs missing accessible labels
HPFeedbackForm.tsx:28-53 — The inputs rely solely on placeholder for labeling. Placeholders disappear as soon as the user types and are not reliably announced by screen readers. Add <label> elements (visually hidden if needed) paired with each input via htmlFor / id.
|
Hey! Components broken down- folder for Homepage- the comparison grid could be broken down further, but is separated where static and not~ likewise the homepage. Tailwind is more standardized! And, yes, the form is simpler. I didn't extract too many of the functions from the sub-components because they're tightly related & I thought more visible in the file :) |
leekahung
left a comment
There was a problem hiding this comment.
Keep up the good work, think we're getting close. See feedback
| const headers = ["", "Tenant First Aid", "Traditional Legal Aid", "ChatGPT"]; | ||
|
|
||
| // 2. Extract table data into a clean structure | ||
| const comparisonData = [ |
There was a problem hiding this comment.
This is a good case for import (see feedback on static lists)
| @@ -0,0 +1,44 @@ | |||
| //Headers for the comparison grid | |||
| const headers = ["", "Tenant First Aid", "Traditional Legal Aid", "ChatGPT"]; | |||
There was a problem hiding this comment.
Consider keeping this inside the component file, outside of the component
There was a problem hiding this comment.
Made comments on what would be a good example to extract, but we can keep both here since it'll be easier to maintain both the headers and the row data. Can keep as is.
|
@claude can you do a double-take on the PR? Check what's been resolved, and what still needs to be touched on that I've missed. |
|
Claude finished @leekahung's task in 2m 39s —— View job PR Double-Take Review — Homepage (#305)
Good progress across the iterations. Here's what's been resolved and what's still open, including a few things that slipped through @leekahung's last review. ✅ Resolved since the last review
❌ Still open from @leekahung's review
|
…n npm install, addressed claude's concerns, removed unnecessary props, and left the <p> tag, just in case, checked the form, added a console. error ~
| const HomePage = () => { | ||
|
|
||
| return ( |
There was a problem hiding this comment.
We don't have pre-commit hooks set up for linting and formatting unfortunately, for the time being, run the npm command for lint and format in the CLI, that should patch up the formatting issues along with any linting problems.
|
@claude can you perform another review? |
|
Claude finished @leekahung's task in 2m 24s —— View job PR Review — Homepage (#305)
✅ Resolved since last review
❌ Still open from @leekahung's latest review
|
…er, and PageLayout changed to reflect homepage- presents no issues with styling
leekahung
left a comment
There was a problem hiding this comment.
Hey Alan, think for my end, there are just 2 things.
First the contrast between the submit button and background color is too small. Could we apply our existing theme colors for text color and background instead?
Second, the submit functionality for the home page form doesn't seem to work, and it's likely due to it not having the transcript (which make sense in our case for the home page). So for that, could you adjust the backend function for /api/feedback?
So instead of:
if not file:
return "No file provided", 404
Try something like:
if not file:
name = request.form.get("name")
subject = request.form.get("subject")
email_params = {
"subject": subject or "Homepage Feedback",
"from_email": os.getenv("SENDER_EMAIL"),
"to": [os.getenv("RECIPIENT_EMAIL")],
"body": f"From: {name}\n\n{feedback}",
}
try:
EmailMessage(**email_params).send()
return "Message sent", 200
except Exception as e:
return f"Send failed: {str(e)}", 500
Think that should fix the API endpoint
What type of PR is this? (check all applicable)
Description
This is a version of the homepage and an additional form with a tie-in to the submit feedback function.
The form, the helper function, and the hp have separate files. Styling in the homepage is contained to that file, & likewise in the form ~
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
I think the form needs to be tested- I haven't had the backend running locally !
Added/updated tests?
Documentation
Architecture.mdhas been updated[optional] Are there any post deployment tasks we need to perform?