Skip to content

Fixed typos in da config + everywhere else they were#221

Open
vivtratx wants to merge 1 commit intodevfrom
Fix-HK-Config-Typos
Open

Fixed typos in da config + everywhere else they were#221
vivtratx wants to merge 1 commit intodevfrom
Fix-HK-Config-Typos

Conversation

@vivtratx
Copy link

@vivtratx vivtratx commented Feb 12, 2026

hi josh i cleaned up very small typos. i wanted to focus more on clubhub but i couldnt let these very small fixes go unnoticed when i was doing cq stuff.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a typo affecting iteration property references across the application, ensuring accurate display of iteration information in event schedules, registration emails, and event passes. Corrected underlying storage keys and Redis prefixes to use the proper property name.

@cloudflare-workers-and-pages
Copy link

Deploying hackkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 71f58d7
Status: ✅  Deploy successful!
Preview URL: https://a6f983df.hackkit.pages.dev
Branch Preview URL: https://fix-hk-config-typos.hackkit.pages.dev

View logs

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

This PR systematically corrects a typo across the codebase by renaming the misspelled property itteration to iteration in the configuration file and updating all dependent references in template strings and property accesses throughout the application. Additionally, the MLH group object configuration is reformatted for consistency.

Changes

Cohort / File(s) Summary
Configuration & Constants
packages/config/hackkit.config.ts, apps/web/src/lib/constants/index.ts
Renamed exported property itterationiteration in config constant; updated storage key constant to reference corrected property name. MLH group object formatting adjusted with explicit color/foreground/checked values.
Frontend UI Components
apps/web/src/app/dash/page.tsx, apps/web/src/app/dash/pass/page.tsx, apps/web/src/components/schedule/UserScheduleView.tsx, apps/web/src/emails/RegistrationSuccessEmail.tsx
Updated property references in Countdown component, EventPass header, schedule subtitle, and registration email heading from c.itteration to c.iteration.
Backend & Utilities
apps/bot/bot.ts, apps/web/src/lib/utils/server/redis.ts
Corrected template string in bot verification embed and Redis key prefix computation to use c.iteration instead of misspelled c.itteration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A typo once haunted each line with such care,
From itteration to iteration fair!
Across all the files, the fix hops along,
With Redis and emails now singing the song. ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fixed typos in da config + everywhere else they were' is vague and uses colloquial language ('da config') that doesn't clearly convey the specific nature of the changes or the extent of the typo fixes across the codebase. Consider revising the title to be more specific and professional, such as 'Fix itteration typo to iteration across codebase' or 'Correct iteration property name spelling throughout application', which clearly describes the actual changes made.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Fix-HK-Config-Typos

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@apps/web/src/lib/constants/index.ts`:
- Line 10: The change to HACKER_REGISTRATION_STORAGE_KEY altered the stored key
(typo fix) and will orphan any in-progress drafts; update the code to handle the
old key by checking for the previous key name
("HackKit_itteration_hackerRegistrationData") and migrating its value to the new
HACKER_REGISTRATION_STORAGE_KEY (or falling back to the old key if present)
before reads/writes. Add the migration logic where
HACKER_REGISTRATION_STORAGE_KEY is used (e.g., the registration save/load helper
or initializer) so existing drafts are preserved and subsequent operations use
the corrected key.

In `@apps/web/src/lib/utils/server/redis.ts`:
- Around line 7-9: Breaking change: includeEnvPrefix switched from using the old
misspelled prefix (c.itteration) to c.iteration which will orphan existing Redis
keys; to avoid data loss restore backward compatibility by updating
includeEnvPrefix to use the original prefix (referencing c.itteration) or
implement a compatibility layer that checks/accepts both prefixes when reading
(and only migrate keys intentionally). Update the includeEnvPrefix function to
reference c.itteration (or add dual-prefix logic) and, if you do intend to
change the canonical prefix, add a documented migration plan for moving existing
keys before deploying.

In `@packages/config/hackkit.config.ts`:
- Around line 985-988: You changed the path used for resume uploads by fixing
the typo in the staticUploads constant (bucketResumeBaseUploadUrl built from
c.hackathonName and c.iteration) which RegisterForm.tsx and
RegisterFormSettings.tsx rely on; verify the infrastructure-migrator migration
script was executed (or run it) before deploying this change so existing resumes
were moved to R2 and DB URLs were updated to the new
/api/upload/resume/view?key=... format—if migration wasn’t run, roll back or run
the migrator and update any DB records pointing to the old itteration-based
paths to the migrated keys to prevent broken resume links.
🧹 Nitpick comments (1)
packages/config/hackkit.config.ts (1)

959-964: MLH badge config changes appear unrelated to the typo fix.

The color, foreground, and checked values for the mlh role badge have been modified. This is a behavioral change (e.g., checked is now false) bundled into a typo-fix PR. Consider noting this in the PR description or splitting it out for clarity.

"default" as keyof typeof c.db.uniqueKeyMapper;
export const PAYLOAD_TOO_LARGE_CODE = 413;
export const HACKER_REGISTRATION_STORAGE_KEY = `${c.hackathonName}_${c.itteration}_hackerRegistrationData`;
export const HACKER_REGISTRATION_STORAGE_KEY = `${c.hackathonName}_${c.iteration}_hackerRegistrationData`;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Storage key value changes — in-progress registration drafts will be lost.

The localStorage key changes from HackKit_itteration_hackerRegistrationData to HackKit_iteration_hackerRegistrationData. Any user with a partially saved registration form will lose that draft. This is low-impact since it's transient data, but worth noting.

🤖 Prompt for AI Agents
In `@apps/web/src/lib/constants/index.ts` at line 10, The change to
HACKER_REGISTRATION_STORAGE_KEY altered the stored key (typo fix) and will
orphan any in-progress drafts; update the code to handle the old key by checking
for the previous key name ("HackKit_itteration_hackerRegistrationData") and
migrating its value to the new HACKER_REGISTRATION_STORAGE_KEY (or falling back
to the old key if present) before reads/writes. Add the migration logic where
HACKER_REGISTRATION_STORAGE_KEY is used (e.g., the registration save/load helper
or initializer) so existing drafts are preserved and subsequent operations use
the corrected key.

Comment on lines 7 to 9
export function includeEnvPrefix(key: string) {
return `${c.hackathonName}_${c.itteration}_${process.env.HK_ENV}_${key}`;
return `${c.hackathonName}_${c.iteration}_${process.env.HK_ENV}_${key}`;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Breaking change: all Redis keys will use a new prefix, orphaning existing data.

The key prefix changes from HackKit_itteration_… to HackKit_iteration_…. All previously stored Redis entries (nav item configs, cached values, etc.) will no longer be found. If this environment has live data, you'll need to either:

  1. Flush/migrate the affected Redis keys, or
  2. Accept that existing cached state will be lost on deploy.

Please confirm this is intentional and won't cause issues in production or staging.

🤖 Prompt for AI Agents
In `@apps/web/src/lib/utils/server/redis.ts` around lines 7 - 9, Breaking change:
includeEnvPrefix switched from using the old misspelled prefix (c.itteration) to
c.iteration which will orphan existing Redis keys; to avoid data loss restore
backward compatibility by updating includeEnvPrefix to use the original prefix
(referencing c.itteration) or implement a compatibility layer that
checks/accepts both prefixes when reading (and only migrate keys intentionally).
Update the includeEnvPrefix function to reference c.itteration (or add
dual-prefix logic) and, if you do intend to change the canonical prefix, add a
documented migration plan for moving existing keys before deploying.

Comment on lines 985 to 988
const staticUploads = {
bucketHost: "/api/upload/resume/view",
bucketResumeBaseUploadUrl: `${c.hackathonName}/${c.itteration}/resumes`,
bucketResumeBaseUploadUrl: `${c.hackathonName}/${c.iteration}/resumes`,
} as const;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for any remaining references to "itteration" in the codebase
echo "=== Searching for 'itteration' references ==="
rg -i 'itteration' --type-list | head -20
rg -i 'itteration' -n 2>/dev/null || echo "No 'itteration' found"

# Also check the actual config file to understand context
echo -e "\n=== Checking hackkit.config.ts for upload-related configuration ==="
fd 'hackkit.config.ts' -x cat -n {} | grep -A 5 -B 5 'bucketResumeBaseUploadUrl\|staticUploads'

Repository: acmutsa/HackKit

Length of output: 1175


🏁 Script executed:

#!/bin/bash
# Check for any references to the old path or related upload handling
echo "=== Searching for resume upload path patterns ==="
rg 'resumes' -n --context=3 -t ts -t tsx 2>/dev/null | head -50

# Look for any migration or backward compatibility logic
echo -e "\n=== Checking for migration or path handling utilities ==="
rg 'migrate\|backward\|compat' -i -n --context=2 -t ts -t tsx 2>/dev/null | grep -i 'resume\|upload\|path' || echo "No migration logic found related to uploads"

# Check git history for this specific file
echo -e "\n=== Git history for the config file ==="
git log --oneline -10 packages/config/hackkit.config.ts 2>/dev/null || echo "Git history not available"

Repository: acmutsa/HackKit

Length of output: 313


🏁 Script executed:

#!/bin/bash
# Search for resume upload/download implementations
echo "=== Searching for resume upload/download handlers ==="
rg 'resume.*upload\|upload.*resume' -i -n --context=3 -t ts -t tsx -t js 2>/dev/null | head -60

# Look for bucketResumeBaseUploadUrl usage
echo -e "\n=== Searching for bucketResumeBaseUploadUrl references ==="
rg 'bucketResumeBaseUploadUrl' -n --context=3 -t ts -t tsx -t js 2>/dev/null

# Check for iteration variable usage
echo -e "\n=== Checking where c.iteration comes from ==="
rg 'iteration["\']?\s*[:=]' -n --context=2 -t ts -t tsx 2>/dev/null | head -40

Repository: acmutsa/HackKit

Length of output: 306


🏁 Script executed:

#!/bin/bash
# Check the git diff or commit details for the typo fix
echo "=== Git commit details for typo fix ==="
git log --all --oneline | grep -i 'typo' | head -10

# Get more details about the specific commit that fixed typos
git show 71f58d7 --stat 2>/dev/null | head -30
git show 71f58d7 | head -80 2>/dev/null

Repository: acmutsa/HackKit

Length of output: 5671


🏁 Script executed:

#!/bin/bash
# Search for staticUploads usage
echo "=== Searching for staticUploads references ==="
rg 'staticUploads' -n --context=5 -t ts -t tsx -t js 2>/dev/null

# Check what's exported from the config file
echo -e "\n=== Checking exports from hackkit.config.ts ==="
rg 'export' -n --context=3 packages/config/hackkit.config.ts 2>/dev/null | tail -30

# Look for any files importing from this config
echo -e "\n=== Files importing from hackkit config ==="
rg 'from.*hackkit.config\|from.*["'"'"']config' -n -t ts -t tsx 2>/dev/null | head -20

Repository: acmutsa/HackKit

Length of output: 345


🏁 Script executed:

#!/bin/bash
# Check if there's any documentation about resume uploads
echo "=== Searching for resume-related documentation ==="
fd -e md -e txt | xargs rg -l 'resume.*upload\|upload.*resume' -i 2>/dev/null

# Check if there are any migration guides or changelogs
echo -e "\n=== Looking for migration or changelog docs ==="
fd -e md | xargs grep -l -i 'migration\|changelog\|breaking' 2>/dev/null

Repository: acmutsa/HackKit

Length of output: 160


🏁 Script executed:

#!/bin/bash
# Search for any pattern that might access the staticUploads object
echo "=== Searching for potential object destructuring or spreading ==="
rg 'staticUploads\|\bucketHost\|\bucketResume' -n --context=5 2>/dev/null

# Check the entire export section of the config file
echo -e "\n=== Full export section ==="
tail -20 packages/config/hackkit.config.ts

# Search for any references to upload paths or bucket operations
echo -e "\n=== Searching for upload or bucket operations ==="
rg 'bucketHost|bucketResume|\bupload\b' -n --context=3 -t ts -t tsx 2>/dev/null | head -40

Repository: acmutsa/HackKit

Length of output: 484


🏁 Script executed:

#!/bin/bash
# Check if staticUploads is even exported
echo "=== Checking complete export block ==="
sed -n '1026,1040p' packages/config/hackkit.config.ts

# Search the entire packages directory for any upload-related code
echo -e "\n=== Checking for upload-related implementations ==="
find packages -type f \( -name "*.ts" -o -name "*.tsx" \) -exec grep -l "upload\|resume" {} \; 2>/dev/null | head -20

Repository: acmutsa/HackKit

Length of output: 393


🏁 Script executed:

#!/bin/bash
# Check the database schema and user functions for resume-related code
echo "=== Checking packages/db/schema.ts for resume references ==="
rg -n 'resume' packages/db/schema.ts -i -B2 -A2

echo -e "\n=== Checking packages/db/functions/user.ts for resume references ==="
rg -n 'resume\|upload' packages/db/functions/user.ts -i -B3 -A3

# Also check if staticUploads is imported anywhere
echo -e "\n=== Checking all imports of staticUploads ==="
rg -n 'import.*staticUploads\|from.*config' packages/db -r 'config' --type ts --type tsx 2>/dev/null | head -20

Repository: acmutsa/HackKit

Length of output: 635


🏁 Script executed:

#!/bin/bash
# Search more broadly for how bucketResumeBaseUploadUrl or similar paths are used
echo "=== Searching all packages for resume path usage ==="
rg 'iteration.*resume|resume.*iteration|/resumes|resumeUrl|resumePath' -i -n -B2 -A2 2>/dev/null | head -60

# Check if there are any server/api route handlers
echo -e "\n=== Looking for API upload handlers ==="
find packages apps -type f \( -name "*.ts" -o -name "*.tsx" \) -path "*/api/*" -o -name "*upload*" 2>/dev/null | head -20

Repository: acmutsa/HackKit

Length of output: 3033


🏁 Script executed:

#!/bin/bash
# Check the resume upload and view handlers
echo "=== Checking resume register endpoint ==="
cat -n apps/web/src/app/api/upload/resume/register/route.ts | head -80

echo -e "\n=== Checking resume view endpoint ==="
cat -n apps/web/src/app/api/upload/resume/view/route.ts | head -80

echo -e "\n=== Checking file upload utilities ==="
cat -n apps/web/src/lib/utils/server/file-upload.ts | head -100

Repository: acmutsa/HackKit

Length of output: 3306


🏁 Script executed:

#!/bin/bash
# Now check where staticUploads is actually imported
echo "=== Searching for imports of staticUploads across the codebase ==="
rg 'staticUploads|bucketResumeBaseUploadUrl' -n --context=5 2>/dev/null

Repository: acmutsa/HackKit

Length of output: 9367


🏁 Script executed:

#!/bin/bash
# Let me check how the bucketResumeBaseUploadUrl is actually used in the put() function
echo "=== Checking the client file-upload.ts for put() implementation ==="
cat -n apps/web/src/lib/utils/client/file-upload.ts | head -80

echo -e "\n=== Checking infrastructure-migrator to understand migration context ==="
sed -n '190,240p' apps/infrastructure-migrator/driver.ts

Repository: acmutsa/HackKit

Length of output: 3296


bucketResumeBaseUploadUrl is actively used and path change is intentional, but migration completeness should be verified.

The typo fix from itteration to iteration was deliberate (commit "Fixed typos in da config + everywhere else they were") and is actively used in file uploads via RegisterForm.tsx and RegisterFormSettings.tsx. New resumes will be stored at the corrected path.

However, existing resumes depend on proper migration: the infrastructure-migrator script handles moving old resumes to R2 storage and updates database URLs to /api/upload/resume/view?key=... format. Confirm that the migration script was executed before this typo fix was deployed, or that all existing resume URLs in the database have been updated to use the migrated keys. If resumes exist in production with old paths and weren't migrated before the config change, they could become inaccessible.

🤖 Prompt for AI Agents
In `@packages/config/hackkit.config.ts` around lines 985 - 988, You changed the
path used for resume uploads by fixing the typo in the staticUploads constant
(bucketResumeBaseUploadUrl built from c.hackathonName and c.iteration) which
RegisterForm.tsx and RegisterFormSettings.tsx rely on; verify the
infrastructure-migrator migration script was executed (or run it) before
deploying this change so existing resumes were moved to R2 and DB URLs were
updated to the new /api/upload/resume/view?key=... format—if migration wasn’t
run, roll back or run the migrator and update any DB records pointing to the old
itteration-based paths to the migrated keys to prevent broken resume links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant