Skip to content

Commit 36a83cf

Browse files
committed
refactor(val): rename walkthrough → tour in prose, emails, and comments
Finishes the walkthrough → tour rename that started with scripts and configs. Val Town backend catches up: - Email subject line (auth-request.ts): "Your Socket walkthrough login code" → "Your Socket tour login code" - Email HTML body (email-template.ts): h1 headline, instruction paragraph, mailto subject — all reference "tour" - Plain-text email body: matches the HTML version - Source-code comments + file headers (index.ts, comments-read.ts, comments-mutate.ts, email-template.ts) now say "tour" - Shell script (integration-test.sh) usage notes point at `pnpm tour:valtown` instead of the old `pnpm walkthrough deploy-val` Intentionally NOT renamed — external identifiers that would churn real accounts or rotation cycles: - config.ts:51 `email: 'socketdev.walkthrough@valtown.email'` — external email address - integration-test.sh:6 `jdalton-socket-walkthroughs.web.val.run` — external Val Town URL Those stay on the walkthrough handle. Users with already-delivered emails see old subject lines; new deliveries match the new brand. All 47 val tests pass; pnpm type + pnpm lint + pnpm check green.
1 parent 1078d61 commit 36a83cf

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

val/auth-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const registerAuthRequest = (app: Hono<AppEnv>): void => {
7777
to: rawEmail,
7878
from: EMAIL_FROM,
7979
replyTo: EMAIL_REPLY_TO,
80-
subject: 'Your Socket walkthrough login code',
80+
subject: 'Your Socket tour login code',
8181
html: renderLoginEmail(code),
8282
text: renderLoginEmailText(code),
8383
})

val/comments-mutate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const registerCommentMutateRoutes = (
3939
}
4040
// Load the row first so we can confirm it exists AND that the
4141
// requester owns it. 404 vs 403 is deliberate: leaking "this id
42-
// exists but you can't touch it" is fine for a walkthrough — it
42+
// exists but you can't touch it" is fine for a tour — it
4343
// doesn't expose anything sensitive about the comment contents.
4444
const existing = await sqlite.execute({
4545
sql: 'SELECT author FROM comments WHERE id = :id AND slug = :slug',

val/comments-read.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* All three are read-only queries against the comments table, so they
55
* share a file. Each requires auth (no anonymous browsing) but none
66
* enforce author-only filters — any authed user can see every comment
7-
* on the walkthrough.
7+
* on the tour.
88
*/
99

1010
import type { Context, Hono, Next } from 'npm:hono@4.12.14'
@@ -38,7 +38,7 @@ export const registerCommentReadRoutes = (
3838

3939
// Dump all (or unresolved-only) comments as a JSON bundle for
4040
// offline archival / review. Single round-trip, no pagination —
41-
// walkthroughs are small enough that the full list is fine.
41+
// tours are small enough that the full list is fine.
4242
app.get('/:slug/api/comments/export', requireAuth, async c => {
4343
await ensureDb
4444
const slug = c.req.param('slug')
@@ -57,7 +57,7 @@ export const registerCommentReadRoutes = (
5757
})
5858
})
5959

60-
// List comments for a single walkthrough part. Part ID capped so a
60+
// List comments for a single tour part. Part ID capped so a
6161
// malformed query string can't produce an inefficient index scan.
6262
app.get('/:slug/api/comments', requireAuth, async c => {
6363
await ensureDb

val/email-template.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* - Logo uses HTTPS image hosted at socket.dev (public CDN)
1010
*
1111
* Copy intentionally does NOT say "sign in to socket.dev" because the
12-
* code grants access to a walkthrough viewer, not socket.dev itself.
12+
* code grants access to a tour viewer, not socket.dev itself.
1313
* Disclaimer links to security@socket.dev so unexpected codes surface
1414
* as real security signal, not noise to ignore.
1515
*/
@@ -29,17 +29,17 @@ export const renderLoginEmail = (code: string): string => {
2929
<div style="text-align:center;margin-bottom:24px;">
3030
<img src="https://socket.dev/images/logo-280x80.png" alt="Socket" width="140" height="40" style="display:inline-block;" />
3131
</div>
32-
<h1 style="margin:0 0 8px 0;font-size:24px;font-weight:600;color:#1a1a1a;text-align:center;">Your Socket walkthrough login code</h1>
33-
<p style="margin:0 0 24px 0;font-size:15px;line-height:1.5;color:#57606a;text-align:center;">Enter this code in the walkthrough to sign in. It expires in 10 minutes.</p>
32+
<h1 style="margin:0 0 8px 0;font-size:24px;font-weight:600;color:#1a1a1a;text-align:center;">Your Socket tour login code</h1>
33+
<p style="margin:0 0 24px 0;font-size:15px;line-height:1.5;color:#57606a;text-align:center;">Enter this code in the tour to sign in. It expires in 10 minutes.</p>
3434
<div style="margin:28px 0;padding:20px;background:#f5f6f8;border-radius:8px;text-align:center;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:34px;font-weight:700;letter-spacing:0.06em;color:#1a1a1a;">
3535
${digits}
3636
</div>
37-
<p style="margin:24px 0 0 0;font-size:13px;line-height:1.5;color:#8b949e;text-align:center;">Didn't request this code? Please report it to <a href="mailto:security@socket.dev?subject=Unrequested%20walkthrough%20login%20code" style="color:#0969da;text-decoration:underline;">security@socket.dev</a>.</p>
37+
<p style="margin:24px 0 0 0;font-size:13px;line-height:1.5;color:#8b949e;text-align:center;">Didn't request this code? Please report it to <a href="mailto:security@socket.dev?subject=Unrequested%20tour%20login%20code" style="color:#0969da;text-decoration:underline;">security@socket.dev</a>.</p>
3838
</div>
3939
</body>
4040
</html>`
4141
}
4242

4343
export const renderLoginEmailText = (code: string): string =>
44-
`Your Socket walkthrough login code is ${code}. It expires in 10 minutes.\n\n` +
44+
`Your Socket tour login code is ${code}. It expires in 10 minutes.\n\n` +
4545
`Didn't request this code? Please report it to security@socket.dev.`

val/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @fileoverview Socket walkthrough comment backend — HTTP entry point.
2+
* @fileoverview Socket tour comment backend — HTTP entry point.
33
*
44
* Composes modules:
55
* config — env vars + constants

val/integration-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Live integration tests for the Socket walkthrough comment val.
2+
# Live integration tests for the Socket tour comment val.
33
# Runs against a deployed Val Town URL. Does NOT require Deno or Node.
44
#
55
# Usage:
@@ -12,7 +12,7 @@
1212
# - SQLite persistence
1313
# - Email sending (manual step — check inbox)
1414
#
15-
# Run after `pnpm walkthrough deploy-val` + secret config. Expected env
15+
# Run after `pnpm tour:valtown` + secret config. Expected env
1616
# vars:
1717
# VAL_URL URL of deployed val
1818
# TEST_EMAIL a @socket.dev address you control

0 commit comments

Comments
 (0)