Repository navigation
refactor(web): slim the frontend and move PR display logic to Rust - #33
Merged
Merged
Conversation
- useSettings: one hook with a per-setting spec (storage key + allowed values, first is default) replaces usePersistentState, four validators, the config-defaults effect, and the 22-field settings prop plumbing; existing localStorage keys are preserved - gh: compute PR status and branch labels server-side - DiffView: patchItem helper for version-bumped updates, apiSend for JSON requests, one fetchFile loader for hydration, positional copy-diff splitting instead of re-parsing patch paths - Share Home/NotFound layout, thread badges and delete button, toolbar chip classes and menu entries; settings popover owns its open state - Move the export page stylesheet into exportShell.css - Remove dead code flagged by knip and the unused enhanced-resolve dep
- Serialize PR status as a Rust enum so the wire contract with the TypeScript literal union is compiler-checked - Read server-config defaults by typed property in useSettings so a renamed AppConfig field fails to compile instead of silently dropping the config.toml default - Warn on patch block / parsed file count mismatch in splitPatchByFile so a missing Copy diff action is explainable - Use buttonVariants for Home/NotFound links instead of hand-rolled positional class strings - Collapse the duplicated dropdown-item markup in the toolbar link menu
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
useSettingshook (storage keys unchanged, precedence unchanged: localStorage → server config → default)statusenum (Open/Draft/Merged/Closed) and pre-computedbaseBranch/headBranchlabels instead of raw GitHub fields.cssfile imported with?rawFollow-up fixes from review
PullStatusis a serialized Rust enum so the wire contract with the TS literal union is compiler-checkeduseSettingsreads server-config defaults by typed property, so renaming anAppConfigfield fails to compile instead of silently dropping theconfig.tomldefaultsplitPatchByFilewarns on a block/file count mismatch instead of silently disabling Copy diffbuttonVariants; toolbar link menu renders oneDropdownMenuItemwith a conditional render propTest plan
cargo test,cargo clippy -D warnings,cargo fmt --checktsc --noEmit,oxlint,oxfmt --check,vite builddiff --gitblock for binary, mode-only, submodule, and empty-file blocks