carlos / platform Public

console: hide Added on phones in the sign-in methods table

Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 095c61373e68935431fe1bd1b250063ef6abc30f parent 0be6337
3 files changed, +22 −4
  • internal/console/settings_methods_test.go +19 −2
  • internal/console/templates/layout.html +1 −0
  • internal/console/templates/settings.html +2 −2

CI failed — run details

Intent

Human

<task-notification> <task-id>byqsvxvpz</task-id> <tool-use-id>toolu_01Y7F11DifEFn1NKRqTgtMbp</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/1730ddc5-7bb6-4ebb-ab9b-85efe2e437e3/tasks/byqsvxvpz.output</output-file> <status>completed</status> <summary>Background command "Ledger Task 5 minors and run fix round 1" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 42.0 g CO₂e (5,164,994 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-console-social-signin, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/console/settings_methods_test.go b/internal/console/settings_methods_test.go
index 4fc94f933..241a74e04 100644
--- a/internal/console/settings_methods_test.go
+++ b/internal/console/settings_methods_test.go
@@ -3,6 +3,7 @@ package console
import (
"net/http"
"net/url"
+ "regexp"
"strings"
"testing"
"time"
@@ -65,8 +66,8 @@ func TestSettingsListsMethods(t *testing.T) {
copyText("methods.kind_email"), copyText("methods.kind_keymail"),
copyText("methods.col_method"), copyText("methods.col_identity"),
copyText("methods.col_added"), copyText("methods.col_used"),
- "<td>a@example.test</td>", "<td>1 Nov 2026</td>",
- "<td>2 Nov 2026</td>", "<td>3 Nov 2026</td>",
+ "<td>a@example.test</td>", `<td class="added">1 Nov 2026</td>`,
+ `<td class="added">2 Nov 2026</td>`, "<td>3 Nov 2026</td>",
} {
if !strings.Contains(section, want) {
t.Errorf("methods section missing %q", want)
@@ -129,6 +130,22 @@ func TestSettingsMethodsDatesDoNotWrap(t *testing.T) {
}
}
+func TestSettingsMethodsHideAddedOnPhones(t *testing.T) {
+ fx, c := settingsMethodsFixture(t)
+ body := settingsMethodsBody(t, fx, c)
+ section := settingsMethodsSection(t, body)
+ if !strings.Contains(section, `<th class="added">`+copyText("methods.col_added")+`</th>`) {
+ t.Error("Added header needs the phone visibility class")
+ }
+ if !strings.Contains(section, `<td class="added">1 Nov 2026</td>`) {
+ t.Error("Added cells need the phone visibility class")
+ }
+ phoneRule := regexp.MustCompile(`(?s)@media\s*\(max-width:\s*40rem\)\s*\{(?:[^{}]|\{[^{}]*\})*?table\.methods\s+\.added\s*\{\s*display:\s*none;\s*\}`)
+ if !phoneRule.MatchString(body) {
+ t.Error("rendered layout must hide methods Added cells inside the 40rem phone breakpoint")
+ }
+}
+
func TestSettingsMethodsReadErrorKeepsCLIAccess(t *testing.T) {
fx, c := settingsMethodsFixture(t)
if _, err := fx.st.db.Exec(`DROP TABLE sign_in_methods`); err != nil {
diff --git a/internal/console/templates/layout.html b/internal/console/templates/layout.html
index ea5d1788d..777b334a0 100644
--- a/internal/console/templates/layout.html
+++ b/internal/console/templates/layout.html
@@ -1021,6 +1021,7 @@
.billing-includes { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 40rem) {
+ table.methods .added { display: none; }
.billing-now { padding: 1rem 1.1rem 1.1rem; }
.done-actions { flex-direction: column; align-items: stretch; margin-top: 1.75rem; }
.done-actions .btn { text-align: center; }
diff --git a/internal/console/templates/settings.html b/internal/console/templates/settings.html
index f8bd58c10..a7852926c 100644
--- a/internal/console/templates/settings.html
+++ b/internal/console/templates/settings.html
@@ -11,12 +11,12 @@
<p class="small">{{.MethodsText "lede"}}</p>
<div class="tablewrap">
<table class="methods">
- <tr><th>{{.MethodsText "col_method"}}</th><th>{{.MethodsText "col_identity"}}</th><th>{{.MethodsText "col_added"}}</th><th>{{.MethodsText "col_used"}}</th></tr>
+ <tr><th>{{.MethodsText "col_method"}}</th><th>{{.MethodsText "col_identity"}}</th><th class="added">{{.MethodsText "col_added"}}</th><th>{{.MethodsText "col_used"}}</th></tr>
{{range .Methods}}
<tr>
<td>{{.Kind}}</td>
<td>{{.Identity}}</td>
- <td>{{fmtDay .AddedAt}}</td>
+ <td class="added">{{fmtDay .AddedAt}}</td>
<td>{{if .LastUsed.IsZero}}{{$.MethodsText "never_used"}}{{else}}{{fmtDay .LastUsed}}{{end}}</td>
</tr>
{{end}}