Skip to content

Keep grounding choices when the other file loads - #39

Merged
jserv merged 1 commit into
sysprog21:mainfrom
ColtenOuO:fix-grounding-selection
Sep 14, 2026
Merged

jserv merged 1 commit into
sysprog21:mainfrom
ColtenOuO:fix-grounding-selection

Conversation

@ColtenOuO

@ColtenOuO ColtenOuO commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Sumarry

In the lobby's document grounding section, every JD or resume upload rebuilt all three snippet lists from scratch. Checking a few JD requirements and then uploading a resume silently unchecked them, and the same happened in reverse.

Sample

Upload and select checkboxes

image

After uploading the resume

image

Fix

Before a file is parsed, the current selection is read and only the groups that file replaces are dropped (requirements for a JD, skills and anchors for a resume), since those indexes point into a list that no longer exists. The rest is restored when the lists are re-rendered.

  • web/document-grounding.js: add retainedSelection(selected, kind)
  • web/app.js: extract checkedGrounding() (shared with the Start handler) and pass the retained selection to renderGroundingChoices

Summary by cubic

Fixes the lobby's document grounding so uploading a resume no longer clears JD requirement checkboxes, and vice versa.

  • Only the groups the new file replaces lose their selections; other checked groups survive the re-render.
  • Extracts checkedGrounding() so the Start handler and file loading share the same selection logic.

Written for commit f328c7b. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread web/app.js Outdated
Comment thread tests/browser/document-grounding.test.js

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase latest main branch and resolve conflicts.

Every upload rebuilt all three snippet lists from scratch, so loading a
resume unchecked JD requirements the candidate had already picked, and
nothing on the page said so. Only the groups a file replaces lose their
selection now, since those indexes point into a list that no longer
exists.
@ColtenOuO
ColtenOuO force-pushed the fix-grounding-selection branch from 65b6fc7 to f328c7b Compare September 14, 2026 09:34
@ColtenOuO

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing!

Addressed all feedback from the inline comments and resolved merge conflicts.

@jserv
jserv merged commit 7efebb0 into sysprog21:main Sep 14, 2026
6 checks passed
@jserv

jserv commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Thank @ColtenOuO for contributing!

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.

2 participants