Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The UI prevented selecting the same book for both drafting and training, but the translation server supports this—it excludes training portions when translating overlapping books.

Changes

Component logic (draft-generation-steps.component.ts):

  • selectableTrainingBooksByProj(): Removed filter excluding books selected for drafting
  • updateSelectedTrainingBooks(): Removed logic that deselected training books when selected for translation

E2E test (generate-draft.ts):

  • Added USE_SAME_BOOK_FOR_DRAFTING_AND_TRAINING flag (default true) at file top
  • When true, selects same book for both drafting and training to validate the scenario

Unit tests (draft-generation-steps.component.spec.ts):

  • Updated 3 tests to expect books can be selected for both purposes simultaneously
  • All 40 tests passing

Before/After

// Before: filtered out books selected for drafting
const booksNotBeingTranslated = booksInTargetAndSource.filter(
  b => this.allAvailableTranslateBooks.find(x => x.number === b.number)?.selected === false
);

// After: all books available for training
const booksAvailableForTraining = booksInTargetAndSource;

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4418 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-1062188 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,15643843428475854921,1681876219033750606,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 git (dns block)
    • Triggering command: /usr/bin/chromium-browser chromium-browser --user-data-dir=/tmp/karma-1062188 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --no-sandbox --disable-extensions --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --autoplay-policy=no-user-gesture-required --remote-debugging-port=9988 http://localhost:9876/?id=1062188 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4756 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-31429124 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,18287736340535057358,9299211925222768991,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 /usr/sbin/phpquery (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4418 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-1062188 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,15643843428475854921,1681876219033750606,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 git (dns block)
    • Triggering command: /usr/bin/chromium-browser chromium-browser --user-data-dir=/tmp/karma-1062188 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --no-sandbox --disable-extensions --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --autoplay-policy=no-user-gesture-required --remote-debugging-port=9988 http://localhost:9876/?id=1062188 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4756 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-31429124 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,18287736340535057358,9299211925222768991,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 /usr/sbin/phpquery (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4418 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-1062188 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,15643843428475854921,1681876219033750606,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 git (dns block)
    • Triggering command: /usr/bin/chromium-browser chromium-browser --user-data-dir=/tmp/karma-1062188 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --no-sandbox --disable-extensions --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --autoplay-policy=no-user-gesture-required --remote-debugging-port=9988 http://localhost:9876/?id=1062188 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4756 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-31429124 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,18287736340535057358,9299211925222768991,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 /usr/sbin/phpquery (dns block)
  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/web-xforge/web-xforge/src/SIL.XForge.Scripture/ClientApp/node_modules/.bin/ng test --browsers xForgeChromiumHeadless --source-map --watch=false --include **/draft-generation-steps.component.spec.ts (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4418 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-1062188 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,15643843428475854921,1681876219033750606,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 git (dns block)
    • Triggering command: /usr/bin/chromium-browser chromium-browser --user-data-dir=/tmp/karma-1062188 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --no-sandbox --disable-extensions --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --autoplay-policy=no-user-gesture-required --remote-debugging-port=9988 http://localhost:9876/?id=1062188 --headless --disable-gpu --disable-dev-shm-usage (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-fake-device-for-media-stream --use-angle=swiftshader-webgl --crashpad-handler-pid=4756 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-31429124 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,18287736340535057358,9299211925222768991,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041 /usr/sbin/phpquery (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

When user generates a draft, we ask what book they want to draft (i.e. translate), and then ask what books they want to use for training the language model. Currently, we don't allow training on a book that they asked to have drafted, and remove it from the list. However, the translation server we're using does support training and drafting on the same book (it just makes sure to only translate portions that were not in the training data). Please update the UI (and anything else that prevents training and drafting the same book) to allow users to select the same book or books for training and drafting.

Then, update the drafting e2e test to make sure it works correctly when selecting the same book for both drafing and translating. Please make it a boolean option at the top of that e2e test's file, and set it to true. That will allow us to easily test both scenarios.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


This change is Reviewable

Copilot AI and others added 2 commits January 22, 2026 19:38
Co-authored-by: Nateowami <6140710+Nateowami@users.noreply.github.com>
…ining and drafting

Co-authored-by: Nateowami <6140710+Nateowami@users.noreply.github.com>
Copilot AI changed the title [WIP] Update UI to allow training and drafting on the same book Allow selecting same books for drafting and training Jan 22, 2026
Copilot AI requested a review from Nateowami January 22, 2026 19:48
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.51%. Comparing base (6563e48) to head (059b13a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3647      +/-   ##
==========================================
- Coverage   83.52%   83.51%   -0.01%     
==========================================
  Files         610      610              
  Lines       37512    37508       -4     
  Branches     6172     6148      -24     
==========================================
- Hits        31332    31326       -6     
- Misses       5226     5241      +15     
+ Partials      954      941      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami added the e2e Run e2e tests for this pull request label Jan 22, 2026
@Nateowami
Copy link
Collaborator

I had Copilot create this so I could easily test how Scripture Forge and Serval handle training and drafting the same book. The result was that the book was fully translated by the model. I have written to the Serval team about it.

Closing for now, as this has served its purpose for now. We can either re-implement it or reopen this when we're ready to actually make this a feature.

@Nateowami Nateowami closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run e2e tests for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants