Skip to content

Examples page: pick a question when none is passed - #53

Merged
tig merged 1 commit into
mainfrom
claude/happy-maxwell-2l2y4e
Sep 24, 2026
Merged

tig merged 1 commit into
mainfrom
claude/happy-maxwell-2l2y4e

Conversation

@tig

@tig tig commented Sep 24, 2026

Copy link
Copy Markdown
Member

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:

  • The heading now reads "Pick a question to see example answers."
  • The page loads questions.json and shows a principle select (it uses c or the default company, and preselects p if it is in the URL). Below it is the list of questions that have examples, each with the same Examples button the bank uses.
  • Principles with no questions of their own get them through shared facets, the same way the bank does. So Dawn and Toyota work too.
  • If you change the level, the links update to match. Each Examples link opens this page with p, q, l, c, and qid set, 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

  • kindel.com was blocked from the sandbox. I built kindelwww with the pinned Hugo 0.143.1 and this branch swapped in for the biq module (HUGO_MODULE_REPLACEMENTS), then drove it with Playwright and Chromium.
  • Before the fix, /kld/apps/biq/examples/?l=senior showed "No question was passed." and "Open this page from an Examples button on the question bank." It had no picker.
  • After the fix, the same URL shows 14 Amazon principles with 9 questions and their Examples buttons. I switched the principle, set the level to Exec, and clicked Examples. The page loaded with l=exec and 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.
  • The standalone examples.html?l=senior, served from the repo root, gives the same result.
  • node scripts/check_facet_questions.js, check_question_ids.js, and check_search.js pass, and python3 -m unittest discover -s tests passes (12 tests).

After this merges, kindelwww needs a module bump for github.com/kindel/biq before the fix goes live on kindel.com.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ni2nSE6BLTzPQNLieTvgtr


Generated by Claude Code

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
Copilot AI lite review requested due to automatic review settings September 24, 2026 13:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T14:01:40.312132Z 172090f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@tig
tig merged commit 96fac94 into main Sep 24, 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.

Feedback: Thank you for sharing your experience! This page can significantly red...

3 participants