Skip to content

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Jan 7, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Difference from initial version #6153

  • All commands in yaml
  • Added couple of cross-references (mostly RTK)
  • Split chunky context files
  • Drafted irrelevant context files
  • Added .local gateway for environment and configuration files
  • Added AGENTS.md for Cursor
  • Refreshed frontend/README.md

How did you test this code?

  • Yet to be tested with real features
  • Ran couple of benchmarks related to context token consumption:
Task: Create banner component + API request for buildVersion

  What I need:
  1. How to create an RTK Query endpoint
  2. How to find/check the backend endpoint
  3. Basic component structure

  ---
  BEFORE (flat structure)

  | File                   | Lines | Why loaded                     |
  |------------------------|-------|--------------------------------|
  | quick-reference.md     | 293   | Component patterns, API basics |
  | api-integration.md     | 220   | RTK Query patterns             |
  | backend-integration.md | 277   | Find buildVersion endpoint     |
  | patterns.md            | 545   | API service patterns           |
  | ui-patterns.md         | 171   | Component structure            |

  Total: ~1,506 lines

  ❌ patterns.md loads everything - mobile patterns, CRUD modals, pagination - even though I only need basic API service patterns.

  ---
  AFTER (atomic structure)

  | File                   | Lines | Why loaded                 |
  |------------------------|-------|----------------------------|
  | quick-reference.md     | ~250  | Simplified, cross-refs     |
  | api-integration.md     | 220   | RTK Query patterns         |
  | backend-integration.md | 277   | Find buildVersion endpoint |
  | patterns/api.md        | ~160  | Only API patterns          |
  | ui-patterns.md         | 171   | Component structure        |

  Total: ~1,078 lines

  NOT loaded:
  - patterns/index.md - full example not needed
  - patterns/mobile.md.draft - irrelevant
  - feature-flags/* - not requested
  - forms.md.draft - not a form

  ---
  Comparison

  | Metric             | Before                                   | After | Saved           |
  |--------------------|------------------------------------------|-------|-----------------|
  | Lines              | 1,506                                    | 1,078 | 428 lines (28%) |
  | Irrelevant content | Mobile patterns, CRUD modals, pagination | None  | ✅              |
 Task: Auth form (sign-in + sign-up), email + password, responsive

  What I need:
  1. Form patterns (Yup + Formik validation)
  2. API endpoints for sign-in/sign-up
  3. Responsive UI patterns (Bootstrap)
  4. Error handling for auth failures
  5. State management for switching sign-in ↔ sign-up

  ---
  BEFORE (flat structure)

  | File                   | Lines | Why loaded                              |
  |------------------------|-------|-----------------------------------------|
  | quick-reference.md     | 293   | Bootstrap classes, general patterns     |
  | api-integration.md     | 220   | RTK Query mutations for auth            |
  | backend-integration.md | 277   | Find auth endpoints                     |
  | ui-patterns.md         | 171   | Responsive patterns, tabs for switching |
  | patterns.md            | 545   | Error handling, API patterns            |
  | forms.md               | 130   | Yup + Formik validation                 |

  Total: ~1,636 lines

  ❌ patterns.md loads mobile CRUD patterns, pagination, file downloads - none relevant for auth form
  ❌ forms.md loaded entirely even if only need validation schema example

  ---
  AFTER (atomic structure)

  | File                   | Lines | Why loaded                      |
  |------------------------|-------|---------------------------------|
  | quick-reference.md     | ~250  | Bootstrap classes, simplified   |
  | api-integration.md     | 220   | RTK Query mutations             |
  | backend-integration.md | 277   | Find auth endpoints             |
  | ui-patterns.md         | 171   | Tabs for sign-in/sign-up switch |
  | patterns/api.md        | ~160  | Error handling only             |

  Total: ~1,078 lines

  NOT loaded:
  - patterns/index.md - full example overkill for form
  - patterns/mobile.md.draft - irrelevant
  - feature-flags/* - not requested
  - forms.md.draft - drafted (would need to un-draft if forms are common)

  ---
  Comparison

  | Metric             | Before                                        | After | Saved           |
  |--------------------|-----------------------------------------------|-------|-----------------|
  | Lines              | 1,636                                         | 1,078 | 558 lines (34%) |
  | Irrelevant content | Mobile, pagination, file downloads, full CRUD | None  | ✅              |

kyle-ssg and others added 30 commits October 14, 2025 14:13
- Add missing developer documentation
- Refresh CONTRIBUTING.md
- Refresh the PR template
- Import developer docs and CONTRIBUTING.md to docs.flagsmith.com
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Matthew Elwell <matthew.elwell@flagsmith.com>
@matthewelwell matthewelwell requested review from a team as code owners January 7, 2026 14:22
@matthewelwell matthewelwell requested review from Holmus and emyller and removed request for a team January 7, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API docs Documentation updates front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants