Add comprehensive codebase reference guide - #1
Merged
Conversation
Adds docs/CODEBASE_GUIDE.md (2,213 lines): a complete technical reference for the vibranceGUI codebase, written for new contributors and AI coding agents with no prior context on the project. Covers the product behaviour, build requirements and the x86 rule, an annotated repository map, the layered architecture, the full runtime story (startup, the foreground-change apply/revert flow, shutdown), both vendor paths in depth, settings and persistence, the three WinForms UIs, data models, a 57-item defect and risk register, an extension guide, and open questions for maintainers. Includes 4 mermaid diagrams and 335 file:line citations. Notable findings documented, each contradicting a reasonable assumption a reader would otherwise make: - Costura.Fody does NOT embed vibranceDLL.dll; a plain MSBuild EmbeddedResource does, extracted by hand at runtime to %APPDATA%. - SetVibranceIngameLevel is a no-op: userVibranceSettingActive is written by both proxies and read nowhere, so the ingame slider's live preview does nothing. - The adl32/adl64 folder names are effectively backwards: adl64 loads the 32-bit atiadlxy.dll, selected by OS bitness, not process bitness. 940 lines of duplication carry one string. - The released v2.5.0 tag is not an ancestor of master; it lives on the unmerged feature/add-color-settings branch (PR juv#140), so master ships older behaviour than the published release. - Foreground matching is by ProcessName only; the executable path is ignored entirely. - The Count > 0 guard wraps both the apply and revert branches, so removing the last watched app while ingame strands vibrance. Mechanisms behind several open upstream issues are documented and explicitly labelled as inference where they could not be confirmed at runtime: juv#138 (a non-terminating enumeration loop), juv#114/juv#132 (DispChangeBadflags raised modally from inside the foreground callback), juv#150/juv#145/juv#142 (hybrid-GPU detection returning Ambiguous), and juv#144. Analysis included a PE and disassembly pass over the prebuilt vibranceDLL.dll, whose source is not in this repository; the NvAPI interface IDs, calling-convention constraints and per-export behaviour it recovers are documented in section 7. Verified against source by a review pass: ~215 of 335 citations sampled, all four headline corrections confirmed, no overstated certainty found. Coverage gaps are recorded in the final report, not in the document. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187tGqyEw4frZzDYPPJfUMd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/CODEBASE_GUIDE.md— a complete technical reference for the vibranceGUI codebase, written for new contributors and AI coding agents with no prior context on the project.2,213 lines · 14 sections · 4 mermaid diagrams · 335
file:linecitationsSections: what the program does → orientation TL;DR → tech stack & build → repository map → architecture → the runtime story end-to-end → the NVIDIA path → the AMD path → settings & persistence → UI surface → data models → defect & risk register → extension guide → open questions.
Documentation only. No source files are modified.
What it covers
EVENT_SYSTEM_FOREGROUNDWinEvent hook) and the apply/revert decision that is the heart of the app.vibranceDLL.dll— whose source is not in this repository — recovering the NvAPI interface IDs it resolves, the calling-convention constraints, and per-export behaviour.file:line.Findings that contradict reasonable assumptions
These are the ones most likely to save a contributor time, because each one is the opposite of what the code appears to promise:
vibranceDLL.dll. A plain MSBuild<EmbeddedResource>does, extracted by hand at runtime to%APPDATA%. Costura is nearly a no-op today.SetVibranceIngameLevelis a no-op.userVibranceSettingActiveis written by both proxies and read nowhere, so the ingame slider's live preview does nothing.adl32/adl64folder names are effectively backwards.adl64loads the 32-bitatiadlxy.dll; the split is by OS bitness, not process bitness. 940 lines of duplication carry a single string literal.v2.5.0tag is not an ancestor ofmaster. It lives on the unmergedfeature/add-color-settingsbranch (PR Feature/add color settings juv/vibranceGUI#140 upstream), somasterships older behaviour than the published release.ProcessNameonly — the executable path is ignored entirely.Count > 0guard wraps both the apply and revert branches, so removing the last watched app while ingame strands vibrance at the ingame level.Upstream issues explained
Mechanisms behind several open upstream issues are documented — juv#138 (a non-terminating enumeration loop, because the native call returns
0rather than-1on any error other than end-of-enumeration), juv#114/juv#132 (DispChangeBadflagsraised modally from inside the foreground callback, and repeating because the guard condition stays true), juv#150/juv#145/juv#142 (hybrid-GPU systems detected asAmbiguous), and juv#144.These are explicitly labelled as inference in the document. They are derived from reading the code, not confirmed at runtime.
Verification
A review pass sampled ~215 of 335 citations against the actual source and read every hand-written
.csfile end to end.Verdict: ship with fixes — 1 blocking, 12 minor, all applied and re-verified.
;inside a mermaid sequence-diagram message terminated the parser's lexer; GitHub would have rendered a red error box instead of the startup diagram. Fixed and confirmed rendering.3 of ~60→2 of 71constants;NvidiaTypes.cs:18-19→:14-15; one overstated "unconditionally").Independently confirmed during review: all four headline corrections above, the value ranges and clamping behaviour, the match rule, the
Count > 0guard, every quoted user-facing string, all build facts, and the binary analysis (8 named RVAs spot-decoded, matching byte-for-byte).Assumptions and limits
git log.🤖 Generated with Claude Code
https://claude.ai/code/session_0187tGqyEw4frZzDYPPJfUMd