Repository navigation
perf(web): replace quadratic LCS with Myers diff and fix deploy workflow - #281
Merged
Merged
Conversation
- Replace O(M*N) 2D matrix LCS in DiffViewer with Myers' O(ND) algorithm in apps/web/src/lib/word-diff.ts - Add prefix/suffix trimming and max-cells fallback cap to prevent UI locking on large statutory diffs - Add comprehensive vitest suite in apps/web/src/__tests__/word-diff.test.ts - Build workspace package dependencies in deploy-site workflow before web build - Resolves #280
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.
Description
This PR resolves issue #280 and fixes the GitHub Pages deployment failure in the
Deploy Siteworkflow.Changes
Myers Diff for Legal Redline (perf(web): replace quadratic LCS diff with Myers or linear-space diff in DiffViewer #280):
apps/web/src/lib/word-diff.ts.DiffViewer.svelteto consumecomputeWordDiffandWordTokenfromapps/web/src/lib/word-diff.ts.Deploy Site Workflow Monorepo Build Fix:
.github/workflows/deploy-site.ymlto build web and its workspace monorepo dependencies (@civic-source/shared,@civic-source/types) viapnpm --filter @civic-source/web... buildbefore Astro builds.packages/**andscripts/**so changes to dependencies trigger site deployment.Closes #280