Skip to content

Trim dead and repeated work - #45

Merged
gpbsumido merged 3 commits into
developfrom
ps/projects-search
Nov 21, 2026
Merged

gpbsumido merged 3 commits into
developfrom
ps/projects-search

Conversation

@gpbsumido

@gpbsumido gpbsumido commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Two leftovers I noted while finishing the Angular guide.

  • Unused repo search. ProjectsService.search was only ever set by its own spec. The ?q= URL it built wouldn't have worked anyway: GitHub ignores q on /users/:user/repos and only filters on the /search endpoints. The signal, the branch and that spec are gone. The resource always requests the same URL as before.
  • Related thoughts rebuilt per pass. app.html calls getRelatedThoughts(win.appId) for every open window on every change detection pass, and it filtered and mapped THOUGHTS each time. Each window's relatedThoughts input got a new array every pass. THOUGHTS is static, so the lookup is now grouped once at module load. Each call returns the same array, or a shared empty one for an app with no related thoughts.

No version bump or changelog entry. Nothing changes that anyone can see or use: the same request goes out and the same thoughts are listed.

Commits

  • c5e1a9a Remove the repo search nothing sets
  • 29d3d6d Add a failing test for related thoughts being rebuilt per call (red: expected [ 'httpresource', …(1) ] to be [ 'httpresource', …(1) ] // Object.is equality)
  • da991fe Group related thoughts once instead of per change detection pass

Verification

  • ng test: 40 files, 302 tests, exit 0
  • tsc on the app and spec configs: exit 0
  • eslint on the changed files: exit 0
  • ng build: exit 0, initial bundle 372.32 kB

No screenshots, since nothing changes visually.

ProjectsService.search was never written outside its own spec, and the
?q= it built does nothing on /users/:user/repos anyway: GitHub only
filters with q on the /search endpoints.
@gpbsumido
gpbsumido marked this pull request as ready for review November 21, 2026 16:58
@gpbsumido
gpbsumido merged commit c8920f1 into develop Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant