Repository navigation
feat: the Settings page says whether searches use the search questions - #97
Merged
Merged
Conversation
Signed-off-by: alkhatibdev <me@alkhatib.dev>
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.
The search questions on the Settings page, and in the governance log
The Settings page shows how an instance is set up and changes nothing, and the search questions
are now part of it: whether searches use them, and for each law how many it has, how many are
current and when they were written, with the models that wrote and checked them. They are
turned off with
dpolens search-questions off, which the governance log records, and the lognow reads its two new entries as sentences rather than as raw action names.
What changes
GET /v1/settingscarriessearch_questions:on, and each law's slug, short name, how manyquestions it holds, how many are current, who wrote and checked them and when. It comes from
the engine functions
dpolens search-questions statususes. There is no write route: thepage reads, and whoever runs the instance changes it, as with every other setting.
under some of its questions says how many are current. The page's subtitle now says most
settings are fixed when the instance starts, since this one is not.
search_questions.loadedas "Loaded 1,081 search questions for UAEPDPL, written 7 November 2026" and
search_questions.switchedas "Turned the searchquestions off" or "on". The loading entry now records its law in its details, as a pack's
loading does.
docs/openapi.json, the API changelog's 0.3.0 list and the dashboard's generated types.Checked
On
23347fawith this change, withGITHUB_ACTIONS=true,CI=trueand every cache off:ruff check,ruff format --check,mypy,lint-imports,scripts/api_contract.py,scripts/client_text.py,docker compose configpytest: 1435 passed. At the database,GET /v1/settingswith no questions loaded, andwith a law's questions loaded, one written for words its clause no longer holds, and the
switch off
prettier --check,eslint,tsc, 130 tests, and the production buildtests: no horizontal overflow, no console errors, each model's name on one line, and the two
laws' rows matching