Answer "where is this in the code?"
New engineers and other teams get answers about the codebase in chat.
Engineering · Software · When you ask · Updated
Works with
- Slack
How do you answer where something is in the code?
To answer where something is in the code, mention Maito in Slack with the question. It reads your repository, follows the flow from where it starts, and replies with file paths, function names and line numbers. It also notes cases the code does not cover, so new engineers and other teams stop guessing.
How it's done today
Senior engineers answer the same questions every week.
What Maito does
- Search the code
- Explain how it works with file links
Example
@Maito where do we send the welcome email?
In api/src/auth/signup.ts, createAccount, line 64. After the user row is saved it queues sendWelcomeEmail in api/src/jobs/welcomeEmail.ts, which renders emails/welcome.mjml and retries 3 times. Invited users get a different template, welcome-invited.mjml, queued from acceptInvite in api/src/auth/invites.ts line 112. Catch: Google sign-ins send nothing. oauthCallback in api/src/auth/oauth.ts creates the account without calling the welcome job, so those users never get it. From searching the repo. Want me to fix the Google case on a branch?
@Maito yes please, with a test.
PR #922 is open. oauthCallback now queues the same job, with a test for a first-time Google sign-in. 14 of 14 auth tests pass.
Noah (11:15 AM):
where do we send the welcome email?
Maito (11:16 AM):
In api/src/auth/signup.ts, createAccount, line 64. After the user row is saved it queues sendWelcomeEmail in api/src/jobs/welcomeEmail.ts, which renders emails/welcome.mjml and retries 3 times.
Invited users get a different template, welcome-invited.mjml, queued from acceptInvite in api/src/auth/invites.ts line 112.
Catch: Google sign-ins send nothing. oauthCallback in api/src/auth/oauth.ts creates the account without calling the welcome job, so those users never get it.
From searching the repo. Want me to fix the Google case on a branch?
Noah (11:19 AM):
yes please, with a test.
Maito (11:34 AM):
PR #922 is open. oauthCallback now queues the same job, with a test for a first-time Google sign-in. 14 of 14 auth tests pass.
How to set it up
- Set up
Nothing to set up. Ask in Slack or by email whenever you need it.
What it won't do
It explains what the code does, not what the team intended. Behavior set in other services or in production settings is outside what it can read.
Questions
The ones connected to your workspace. It reads code and does not change it unless you ask.
Yes. Anyone in the thread can mention it, and it explains in plain words with the paths behind the answer.
It reads the branch you point it to, usually main, so it matches the code at that moment.