Skip to content

Draft: docs(decision-records): add inline comments explaining custom implementations

Greeshma Kanukunta requested to merge docs/decision-records-fix into develop

Overview

This MR adds inline decision record comments for custom implementations used in the codebase. It improves maintainability by documenting the rationale behind these decisions, helping future contributors understand trade-offs and avoid redundant rewrites.


What does this MR do and why?

Previously, several parts of the project used custom implementations without documenting why established FOSS libraries were not adopted. This lack of context could lead to confusion, duplication of effort, or incorrect refactoring.

This MR addresses that gap by:

  • Adding inline decision record comments in key files
  • Explaining the reasoning behind choosing custom implementations
  • Highlighting trade-offs and future considerations

The approach uses inline comments instead of separate ADR files to keep documentation close to the code.


Changes Made

  • Added comments in:

    • src/contexts/ThemeContext.tsx
    • src/utils/searchUtils.ts
    • src/lib/utils.ts (formatToIST)
    • src/contexts/AuthContext.tsx
  • No functional code changes


Technical Details

  • No logic changes
  • Only comments added
  • Includes:
    • Alternative libraries (next-themes, Fuse.js, date-fns-tz)
    • Trade-offs
    • Future considerations

Type of Change

  • 📝 Documentation update

How to Set Up and Validate Locally

git checkout docs/decision-records-fix
bun install
bun dev

Verify:

  • App runs normally
  • No functional changes
  • Comments visible in updated files

Testing Done

  • Manual testing completed

Test Cases

Scenario Expected Result Status
App loads No change
Navigation Works normally
Comments Present & correct

Code Quality Checklist

  • No logic changes
  • No unused code
  • No console logs
  • Lint passes
  • No UI/API changes

Notes

  • Documentation-only change
  • Safe to merge
  • Improves maintainability
Edited by Greeshma Kanukunta

Merge request reports

Loading