FUS-7 address activity modal review

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
gsxdsm
2026-06-11 08:01:51 -07:00
parent 28187cf36b
commit bf21b6b463
2 changed files with 15 additions and 10 deletions

View File

@@ -1,19 +1,15 @@
import { describe, it, expect } from "vitest";
import { loadAllAppCss } from "../test/cssFixture";
import { readFileSync } from "fs";
import { resolve } from "path";
/**
* Stylesheet regression test for Activity Log mobile layout.
* Stylesheet regression test for Activity Log modal layout.
*
* Parses `packages/dashboard/app/styles.css` and asserts that an
* `@media (max-width: 768px)` block contains Activity Log mobile rules
* for stacked/wrapped controls and entry layout. These selectors must
* remain inside a mobile media query so the Activity Log renders
* correctly on narrow screens.
* Parses the app CSS bundle and asserts that desktop viewport constraints
* keep the modal on screen while mobile rules keep controls usable on
* narrow screens.
*/
describe("activity-log-mobile-layout.css", () => {
describe("activity-log-layout.css", () => {
const cssContent = loadAllAppCss();
/** Extract all content inside @media (max-width: 768px) blocks. */
@@ -56,6 +52,15 @@ describe("activity-log-mobile-layout.css", () => {
expect(modalBlock).toContain("overflow: hidden;");
});
it("allows content pane to shrink and scroll inside the capped modal", () => {
const contentBlock = cssContent.match(
/\.activity-log-content\s*\{(?=[^}]*overflow-y:\s*auto;)(?=[^}]*min-height:\s*0;)[^}]*\}/,
)?.[0];
expect(contentBlock).toBeTruthy();
expect(contentBlock).toContain("overflow-y: auto;");
expect(contentBlock).toContain("min-height: 0;");
});
// ── Close button ────────────────────────────────────────────────────
it("does not define a custom activity-log-close style (uses shared modal-close)", () => {

View File

@@ -1253,7 +1253,7 @@
flex: 1;
overflow-y: auto;
padding: var(--space-lg) var(--space-xl);
min-height: 300px;
min-height: 0;
}
.activity-log-empty {