Skip to content

Show a report's note: to its sender on /club, on its page once published, and on its board - #410

Merged
widgetii merged 2 commits into
masterfrom
report-notes-shown
Oct 8, 2026
Merged

widgetii merged 2 commits into
masterfrom
report-notes-shown

Conversation

@widgetii

@widgetii widgetii commented Oct 8, 2026

Copy link
Copy Markdown
Member

An owner asked in the OpenIPC chat whether the "Anything else: where you bought it, what it is sold as" field is kept. It is: the note as written is stored for the maintainers, and a redacted copy for the public (note_public, migration 018). But nothing showed it: not /club, not the report's page, and not the board the report was published on.

Changes

  • /club: each of the member's reports now shows "Your note: …", exactly as they wrote it (club/Club.tsx).
  • Report page: "The owner's note: …" appears once the report is published (reports/Receipt.tsx). The service already serves only the redacted copy, and only after publishing (Store.Public).
  • Board page: PublishedTexts carries note_public, and refreshReportUnits passes it on as the unit's note (board_units.notes, which the board panel already shows). Units already made from published reports pick their notes up on the next refresh, which runs at service start.
  • Translations in en, ru and zh.

Tests

  • club, TestTheSendersNoteIsShownAndPublishedRedacted: the sender sees the note as written, and the published note going onto the board has the pasted MAC replaced by its keyed hash.
  • club/Notes.test.tsx: the note on /club and on a published report's page. Both tests fail without the change.
  • service/run.sh test: all 22 packages pass, and gofmt is clean. Frontend lint, typecheck, tests (706) and build pass, and the bundle check passes.

Not yet done

  • Validation on dev.openipc.org.

…hed, and on its board

An owner asked whether the "Anything else: where you bought it, what it is
sold as" field is kept: it is, as written for the maintainers and redacted
for the public (note_public, migration 018), but nothing showed it -- not
/club, not the report's page, not the board it was published on.

- /club lists the member's own note beside each of their reports, as they
  wrote it.
- The report's page shows the owner's note once the report is published;
  the service serves only the redacted copy, and only then.
- A published report's note becomes the note of the unit it makes on its
  board (board_units.notes, which the board panel already shows), redacted.
  Units already made pick it up on the next refresh.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Show report notes to senders and on published reports and boards

✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Show senders their original report notes on /club.
• Show redacted notes on published report pages and the boards they reach.
• Add English, Russian, and Chinese translations and note-visibility tests.
Diagram

graph TD
  DB[("Report storage")] -->|original note| Club["Club ledger"]
  DB -->|published redacted note| Public["Public report view"] --> Receipt["Report page"]
  DB -->|published redacted note| Texts["Published texts"] --> Importer["Board importer"] --> Units[("Board units")]
Loading
High-Level Assessment

Use the existing original-note member response, publication-gated public view, and board contribution importer. This preserves the established redaction boundary and lets existing board units receive notes on refresh; a separate note-serving path would duplicate those rules.

Files changed (12) +99 / -9

Enhancement (4) +16 / -6
Club.tsxShow senders their report notes +3/-0

Show senders their report notes

• Displays a report's original note beside its entry in the member ledger when a note exists.

frontend/apps/site/src/components/club/Club.tsx

Receipt.tsxShow the owner's note on report pages +3/-0

Show the owner's note on report pages

• Displays a note returned with the report view. The existing service view withholds notes until publication.

frontend/apps/site/src/components/reports/Receipt.tsx

club.goPass published notes into board contributions +3/-1

Pass published notes into board contributions

• Sets each report-derived contribution's note from the redacted published text. The existing board importer writes it to the unit's notes.

service/cmd/openipc/club.go

club.goInclude redacted notes in published board text +7/-5

Include redacted notes in published board text

• Extends BoardText and PublishedTexts to carry note_public alongside each published report's files.

service/internal/reports/club.go

Tests (2) +68 / -0
Notes.test.tsxTest note display on club and report pages +42/-0

Test note display on club and report pages

• Checks that /club shows the sender's original note and a published report page shows the redacted note returned by the service.

frontend/apps/site/src/components/club/Notes.test.tsx

newcamera_test.goTest original and redacted note paths +26/-0

Test original and redacted note paths

• Checks that the sender's reports response retains their original note while published board text replaces a pasted MAC with its redacted form.

service/internal/club/newcamera_test.go

Other (6) +15 / -3
boards.en.ymlAdd English note labels +2/-0

Add English note labels

• Adds labels for the sender's note on /club and the owner's note on a report page.

data/locales/boards.en.yml

boards.ru.ymlAdd Russian note labels +2/-0

Add Russian note labels

• Adds Russian labels for both new note displays.

data/locales/boards.ru.yml

boards.zh.ymlAdd Chinese note labels +2/-0

Add Chinese note labels

• Adds Chinese labels for both new note displays.

data/locales/boards.zh.yml

boards.en.jsonAdd English frontend note translations +3/-1

Add English frontend note translations

• Adds the generated frontend translations for the club and report note labels.

frontend/apps/site/src/i18n/boards.en.json

boards.ru.jsonAdd Russian frontend note translations +3/-1

Add Russian frontend note translations

• Adds the generated Russian frontend translations for the club and report note labels.

frontend/apps/site/src/i18n/boards.ru.json

boards.zh.jsonAdd Chinese frontend note translations +3/-1

Add Chinese frontend note translations

• Adds the generated Chinese frontend translations for the club and report note labels.

frontend/apps/site/src/i18n/boards.zh.json

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Some published notes stay off boards ✓ Resolved
Description
PublishedTexts selects note_public only from rows joined to a qualifying public file, so it
omits published reports that have a note but no public files. A sender can submit a note-only
report, or one with only a private backup, and have it linked and published; neither report produces
the board unit that would display its note.
Code

service/internal/reports/club.go[495]

+		SELECT r.id, rm.model_id, coalesce(cm.name, ''), r.note_public, f.position, f.kind, f.name, f.public_sha256
Evidence
The submission handler accepts a note without YAML or file parts, while publication can link that
report to a board. The changed query requires a joined public file before it can return the note;
refresh creates contributions only from returned rows. The board’s separate owner-reports component
lists such reports but does not render their notes, so it does not fill the display gap.

service/internal/reports/handler.go[226-240]
service/internal/reports/store.go[166-190]
service/internal/reports/club.go[367-405]
service/internal/reports/club.go[493-519]
service/cmd/openipc/club.go[70-89]
frontend/apps/site/src/components/reports/OwnerReports.tsx[38-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Published reports with a sender note but no qualifying public file are excluded from `PublishedTexts`, so their notes never become board-unit notes.
## Fix Focus Areas
- service/internal/reports/club.go[493-519]
- service/cmd/openipc/club.go[70-87]
## Recommended Fix
Preserve published report/model rows without public files by moving the public-file filters into a left join. Scan nullable file columns and append a `BoardTextFile` only when a qualifying file exists. Add a test for a published, board-linked note-only report reaching a zero-file board unit with its redacted note.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread service/internal/reports/club.go
…board unit

PublishedTexts joined only reports with a served text or photo file, so a
note sent alone, or beside a private backup, reached no board. The files
are joined optionally now, and a report with a published note is listed
without them; a private backup still never goes with it.
@widgetii
widgetii merged commit 82c6c47 into master Oct 8, 2026
4 checks passed
@widgetii
widgetii deleted the report-notes-shown branch October 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants