Examples page: pick a question when none is passed - #53
Merged
Merged
Conversation
Opening the examples page without a q param (search hit, sitemap, shared link) showed "No question was passed." and no way to pick one. The page now lists the questions with examples for the current company, with a principle select and an Examples button per question. Level changes carry into the links. Fixes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ni2nSE6BLTzPQNLieTvgtr
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds a question picker to the Examples page when no question is provided.
Changes:
- Loads and filters example-backed questions.
- Supports company selection, facet inheritance, and level-aware links.
- Preserves existing behavior for direct question links.
| File | Summary |
|---|---|
js/biq-examples.js |
Implements the no-question picker and dynamic example links. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Fixes #52
Root cause
Nothing was broken. The examples page only works when it gets a question in the URL (
p,q,qid,c), and the Examples buttons on the question bank add those. If you open the page with no question, from a search result, the sitemap, or a shared link,updateUrl()adds?l=senior, which is the URL in the report. The page then showed "No question was passed." and the level radios, and it offered no way to pick a question. The fix was to add one.Fix
In
js/biq-examples.js, when no question is passed:questions.jsonand shows a principle select (it usescor the default company, and preselectspif it is in the URL). Below it is the list of questions that have examples, each with the same Examples button the bank uses.p,q,l,c, andqidset, so the usual example sheet renders.The change reuses the existing classes (
bhiq-select,bhiq-group,bhiq-qrow,bhiq-examples-btn), so the CSS and markup are unchanged. When a question is passed, the page works as before.Verification
HUGO_MODULE_REPLACEMENTS), then drove it with Playwright and Chromium./kld/apps/biq/examples/?l=seniorshowed "No question was passed." and "Open this page from an Examples button on the question bank." It had no picker.l=execand rendered the raise and lower columns, labeled "Exec hire-level". There were no page errors.?c=dawn(15 tenets) and?c=toyota(5 keywords, facet questions only) both render the picker, and clicking Examples loads the sheet.examples.html?l=senior, served from the repo root, gives the same result.node scripts/check_facet_questions.js,check_question_ids.js, andcheck_search.jspass, andpython3 -m unittest discover -s testspasses (12 tests).After this merges, kindelwww needs a module bump for
github.com/kindel/biqbefore the fix goes live on kindel.com.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ni2nSE6BLTzPQNLieTvgtr
Generated by Claude Code