diff --git a/cmd/creator-web/responsive_test.go b/cmd/creator-web/responsive_test.go index e908246..12248ee 100644 --- a/cmd/creator-web/responsive_test.go +++ b/cmd/creator-web/responsive_test.go @@ -32,3 +32,20 @@ func TestCreatorConsoleResponsiveGuardrails(t *testing.T) { } } } + +func TestChatResponsiveGuardrailsConstrainMobileGridItem(t *testing.T) { + css, err := staticFiles.ReadFile("static/assets/chat.css") + if err != nil { + t.Fatal(err) + } + stylesheet := string(css) + for _, guard := range []string{ + ".chat-view { width: 100%; min-width: 0;", + "@media (max-width: 640px)", + ".chat-layout { height: auto; display: block; }", + } { + if !strings.Contains(stylesheet, guard) { + t.Fatalf("chat responsive guardrail missing: %s", guard) + } + } +} diff --git a/cmd/creator-web/static/assets/chat.css b/cmd/creator-web/static/assets/chat.css index 3fc0dfe..b6fe4e4 100644 --- a/cmd/creator-web/static/assets/chat.css +++ b/cmd/creator-web/static/assets/chat.css @@ -29,7 +29,7 @@ textarea { resize: vertical; min-height: 84px; max-height: 240px; padding: 14px; .login-form button, .composer button { border: 0; color: #11150f; background: var(--signal); font-weight: 700; } .login-form button { width: 100%; height: 50px; margin-top: 18px; } #login-error { min-height: 20px; color: var(--bad); font-size: 13px; } -.chat-view { height: 100vh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; } +.chat-view { width: 100%; min-width: 0; height: 100vh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; } .chat-header { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(16, 23, 20, .98); } .chat-header a { color: var(--ink); text-decoration: none; font: 400 24px/1 var(--serif); } #active-focus { color: var(--good); } diff --git a/dev/ACTIVE_TASK.json b/dev/ACTIVE_TASK.json index 97dbd99..c842cd2 100644 --- a/dev/ACTIVE_TASK.json +++ b/dev/ACTIVE_TASK.json @@ -1,5 +1,5 @@ { - "task_file": "dev/tasks/DEV-000288-production-evidence-revision.json", - "task_id": "DEV-000288", + "task_file": "dev/tasks/DEV-000289-chat-mobile-overflow-fix.json", + "task_id": "DEV-000289", "task_revision": 1 } diff --git a/dev/tasks/DEV-000289-chat-mobile-overflow-fix.json b/dev/tasks/DEV-000289-chat-mobile-overflow-fix.json new file mode 100644 index 0000000..6e480da --- /dev/null +++ b/dev/tasks/DEV-000289-chat-mobile-overflow-fix.json @@ -0,0 +1,23 @@ +{ + "task_id": "DEV-000289", + "task_revision": 1, + "architecture_revision": "ADR-0018", + "base_repo_revision": "a2ff01050e5a2e22b29b85c700ff788d739e1c77", + "risk_tier": "E", + "intent": "Remove authenticated chat horizontal overflow at mobile viewport widths caused by intrinsic grid-item width.", + "requirement_ids": ["authenticated mobile UI acceptance", "no horizontal overflow at 390px"], + "allowed_change_scope": {"modules": ["creator-web"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000289-chat-mobile-overflow-fix.json", "cmd/creator-web/static/assets/chat.css", "cmd/creator-web/responsive_test.go"]}, + "forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "LLM-local/**", "modules/**", "adapters/**"]}, + "allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 0, "new_third_party_dependencies": 0, "new_database_owner_roles": 0}, + "contracts": {"consume": ["existing creator-web HTML/CSS surface"], "may_change": []}, + "semantic_owner": "creator-web presentation", + "canonical_state": ["none"], + "state_transitions": ["mobile layout intrinsic width -> constrained viewport width"], + "side_effects_and_privileges": ["none"], + "persistence_and_migrations": ["none"], + "failure_retry_restart": ["CSS-only; no runtime state or recovery semantics changed"], + "assumptions": ["desktop layout must remain unchanged", "deep UI and load tests remain deferred"], + "acceptance_scenarios": ["authenticated chat has no horizontal overflow at 390px", "existing mobile media rules remain present", "desktop static layout remains unchanged"], + "required_tests": ["go test ./cmd/creator-web", "go vet ./cmd/creator-web", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke", "one authenticated mobile smoke"], + "terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"] +}