@@ -327,7 +317,26 @@ export function StudyFeed({ deck }: { deck: Deck }) {
onAnswered={(correct, meta) => handleAnswered(activity, correct, meta)}
onNext={() => goTo(activityIndex + 1)}
/>
-
+ {/* Under the card: disclaimer centred, report control in the
+ bottom-right corner (it used to sit in the top chrome). */}
+ {!finished && index === activityIndex ? (
+
+
+
+
+ {
+ setSkipped((current) => [...current, activity.id]);
+ goTo(activityIndex + 1);
+ }}
+ />
+
+
+ ) : (
+
+ )}
))}
diff --git a/public/sw.js b/public/sw.js
index ccd1133..aa3a537 100644
--- a/public/sw.js
+++ b/public/sw.js
@@ -9,7 +9,7 @@
*
* Bumping CACHE_VERSION is how a new deploy invalidates old assets.
*/
-const CACHE_VERSION = "freezmo-v42";
+const CACHE_VERSION = "freezmo-v43";
const SHELL_CACHE = `${CACHE_VERSION}-shell`;
const ASSET_CACHE = `${CACHE_VERSION}-assets`;
diff --git a/tests/phase2-test.mjs b/tests/phase2-test.mjs
index cec0e41..88c234a 100644
--- a/tests/phase2-test.mjs
+++ b/tests/phase2-test.mjs
@@ -142,7 +142,37 @@ const browser = await launchBrowser();
await page.waitForTimeout(1000);
const report = page.getByRole("button", { name: "Report question" });
- check("report: button sits in the feed chrome", await report.isVisible());
+ check("report: button visible", await report.isVisible());
+ // It belongs under the card now: bottom-right corner of the exercise, not
+ // in the top chrome where it was easy to mis-tap.
+ const placement = await page.evaluate(() => {
+ const prompt = [...document.querySelectorAll("p")].find(
+ (el) => el.textContent === "What colour is a clear daytime sky?",
+ );
+ const card = prompt?.closest(".glass-solid");
+ const button = document.querySelector('[aria-label="Report question"]');
+ if (!card || !button) return null;
+ const c = card.getBoundingClientRect();
+ const b = button.getBoundingClientRect();
+ return {
+ inChrome: Boolean(button.closest("header")),
+ belowCard: b.top >= c.bottom - 6,
+ rightAligned: Math.abs(b.right - c.right) <= 10,
+ rightSide: b.left + b.width / 2 > c.left + c.width / 2,
+ size: [Math.round(b.width), Math.round(b.height)],
+ };
+ });
+ check(
+ "report: sits bottom-right under the card, 44px",
+ Boolean(placement) &&
+ !placement.inChrome &&
+ placement.belowCard &&
+ placement.rightAligned &&
+ placement.rightSide &&
+ placement.size[0] >= 43.5 &&
+ placement.size[1] >= 43.5,
+ JSON.stringify(placement),
+ );
await report.click();
await page.waitForTimeout(700);
check("report: toast with Undo", await page.getByText("Question reported").isVisible());