Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/admin/src/features/events/events-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ function EventDetail({ eventId, onCancelled }: { eventId: string; onCancelled: (
>
<Icons.Send size={13} /> Post update <span className="kbdhint">⌘⏎</span>
</button>
<div className="evt-post-hint">Updates are posted as CivFix, not from your own account.</div>
</div>
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions apps/admin/src/features/reports/official-author.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { readFileSync } from "node:fs"

import { describe, expect, it } from "vitest"

const source = readFileSync(new URL("./reports-page.tsx", import.meta.url), "utf8")

describe("official author in the report chat", () => {
it("marks CivFix posts by the server's official flag, never by name or handle", () => {
expect(source).toMatch(/msg\.from\?\.official && !removed/)
expect(source).not.toMatch(/handle\s*===|name\s*===\s*"CivFix"/)
})
})
7 changes: 6 additions & 1 deletion apps/admin/src/features/reports/reports-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ function ChatMessageRow({
<span className="dsc-msg-who">{authorName}</span>
)}
{handle && !removed && <span className="dsc-msg-handle mono">{handle}</span>}
{msg.from?.official && !removed && (
<span className="pill status-ok tight" title="The official CivFix account">
<Icons.Check size={10} /> Official
</span>
)}
{msg.forwardedToCity && (
<span className="pill status-progress tight" title="Forwarded to the routed city">
<Icons.Send size={10} /> Forwarded to city
Expand Down Expand Up @@ -437,7 +442,7 @@ function ReportDiscussion({
className="rep-followup"
rows={3}
maxLength={MESSAGE_BODY_MAX}
placeholder="Message the neighbors in this report's chat…"
placeholder="Message the neighbors as CivFix…"
value={draft}
onChange={(e) => setDraft(e.target.value)}
onKeyDown={(e) => {
Expand Down
1 change: 1 addition & 0 deletions apps/admin/src/styles/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,7 @@ img.user-av { object-fit: cover; background: var(--paper-2); }
.evt-msg-who { font-weight: 700; font-size: 12px; color: var(--sun-700); }
.evt-msg-when { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); }
.evt-msg-text { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.evt-post-hint { font-size: 11px; color: var(--ink-3); margin-top: 6px; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Use design tokens

.evt-post-hint introduces raw 11px typography and 6px spacing values. This violates the repository requirement to use design tokens for frontend styling; use the appropriate typography and spacing tokens instead. The requirement must be satisfied before merging.

Rule Used: # civfix review rules civfix is a live civic-tech platform that will hold government contracts. Review every PR for correctness, security and performance. Flag real defects with evidence; skip style nits that lint already covers. ## Repos - **... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/admin/src/styles/admin.css
Line: 2511

Comment:
**Use design tokens**

`.evt-post-hint` introduces raw `11px` typography and `6px` spacing values. This violates the repository requirement to use design tokens for frontend styling; use the appropriate typography and spacing tokens instead. The requirement must be satisfied before merging.

**Rule Used:** # civfix review rules  civfix is a live civic-tech platform that will hold government contracts. Review every PR for **correctness, security and performance**. Flag real defects with evidence; skip style nits that lint already covers.  ## Repos  - **... ([source](https://app.greptile.com/civfix/-/custom-context?memory=39a53925-3d93-4c82-980e-27b67393717d))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code


/* -- Report discussion (public comment thread; distinct from the Activity timeline) -- */
.dsc-list { display: flex; flex-direction: column; gap: 10px; }
Expand Down
Loading