feat(web): slice 5 — share links settings and public share page on HeroUI (feature 014, T172-T195) - #353
feat(web): slice 5 — share links settings and public share page on HeroUI (feature 014, T172-T195)#353ValgulNecron wants to merge 12 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI Report - b9863cbrun 34394676112 - attempt 1 3 failed - 4 passed - 10 skipped - 13m34s elapsed Failing
Coverageno coverage/* commit statuses found on b9863cb Changed
Slowest jobs
e2e buckets run
|
acc4731 to
e3abe66
Compare
d6e53d5 to
d0f9b4d
Compare
e3abe66 to
437c975
Compare
cc3c61a to
b74ea22
Compare
437c975 to
f1308fa
Compare
b74ea22 to
264fd90
Compare
f1308fa to
b21f06d
Compare
fe82f43 to
bfb0a4f
Compare
b21f06d to
7bab98b
Compare
65e4cc1 to
9358cb1
Compare
7bab98b to
deea34d
Compare
62a142b to
416bbaa
Compare
deea34d to
b38fba2
Compare
416bbaa to
21dc2bc
Compare
b38fba2 to
4debd23
Compare
21dc2bc to
ed7dfde
Compare
4debd23 to
2efc835
Compare
ed7dfde to
087df97
Compare
2efc835 to
d7c7809
Compare
087df97 to
51793e4
Compare
…172-T174) ShareLink/ShareLinkPublic types mirror the API's Go structs; Shares namespace in endpoints.ts and api.ts (authenticated create/list/revoke, public resolve/start mapping 404/429 to a neutral response per FR-005); unit tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98 Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…/created/revoke dialogs (feature 014, T175-T178; T179 mounts it in Settings on the slice-2b branch) Design: xCJlu dQV9N atqRh VM7ro S7SCDc (design commit 3c40edb). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98 Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…iew-only), Starting and Invalid states; honours the stored appearance; FR-005 privacy (feature 014, T181-T188) Design: C2LQE4 q31B6w qFLfB EcoGD epZO2. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98 Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…189-T191) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98 Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…entry; FR-005/FR-012 checks recorded (feature 014, T193-T195) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98 Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…rrors - Mock @tanstack/react-router hooks (useParams) instead of creating Router instance - Fix APIError constructor params to match actual API (status, body not message, status) - Correct vi.clearAllIntervalIDs() → vi.clearAllTimers() - Replace global → globalThis in spyOn calls - Remove unused error state and setError calls from Share.tsx - Fix @testing-library/user-event API: selectOption → selectOptions - Remove unused ShareLinkCreateRequest import - Escape all unescaped apostrophes in JSX text (render/no-unescaped-entities) - Fix ModuleSources closing brace in endpoints.ts - Remove unused rerender and unmount destructuring from tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0179Kk2kNC9XQD8n8nKG2fsZ Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0179Kk2kNC9XQD8n8nKG2fsZ Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
- Fix Share.test.tsx vi.mock hoisting: declare mockUseParams before mock calls - Add ModuleSources.upload and ModuleSources.removeUpload to endpoints.ts - Add isRowHeader prop to ShareLinksSection table's first column (react-aria requirement) - Simplify ShareLinks.test.tsx: update role queries for HeroUI v3 components These fixes address rebase conflicts and HeroUI v3 API changes after stacking onto the 2b base (014d-server-settings). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0179Kk2kNC9XQD8n8nKG2fsZ Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…ew of 86cbdb7a)
Share.test.tsx: hoist the useParams mock (vi.hoisted) so it survives
vi.mock hoisting; query the HeroUI Spinner by its real role="status"
instead of a nonexistent progressbar; match the Asleep/Starting/Invalid
copy with partial-text regexes since the real markup renders full
sentences, not the single fragments the tests expected; resolve the
clipboard mock so the copy handler's .catch() doesn't throw; restore
real timers in afterEach so a fake-timer test that fails before its own
cleanup doesn't hang every later test in the file; fix the self-
contradicting FR-005 "no reveal" assertion that checked for words the
neutral copy legitimately contains.
ShareLinks.tsx: give the allow-start Switch actual content
(Switch.Content > Switch.Control > Switch.Thumb) plus an aria-label —
without a Content child react-aria-components never renders the input,
so no role="switch" element existed at all.
ShareLinks.test.tsx: query the table via role="grid" (react-aria's real
role, not "table"); drive the expiry Select through its real trigger/
option roles instead of a dead checkbox-length guard; wait for row
content (not just the empty grid shell) before asserting on it or
querying Revoke buttons; reset msw handlers between tests so a
server.use() override doesn't leak into later tests; match the actual
{error} body errorText() renders instead of the unused fallback string;
give the "Active status" fixture an expiry relative to Date.now() so it
doesn't go stale against the real clock.
EnvVars.tsx: wrap the Name Input in a TextField with isInvalid so its
FieldError children (which read isInvalid from TextField context) can
actually render; add isRowHeader to the Name column, which react-aria's
Table requires and which fired as an uncaught exception on every
render.
Settings.test.tsx: query the per-row Remove button by its real
aria-label role instead of a title attribute nothing sets.
Share.test.tsx, ShareLinks.test.tsx, Settings.test.tsx, and
lib/endpoints(+_more)/api tests are all green with 0 unhandled errors.
Pre-existing failures in Backups/NetworkCapture/Resources/Lifecycle/
Version/Mods/Modpacks/CaptureWidget/Networking_more and friends are
unrelated files from other slices' HeroUI migration, left untouched.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179Kk2kNC9XQD8n8nKG2fsZ
Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
The rebase of slice 5 onto slice 4 merged both the parent's system-logs handlers and the replay's share-links handlers, but dropped the closing paren of the system-logs handler's http.get call. Restore it to fix tsc. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Euoj6Jxu2a2gBVqSM6VjcB Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
Share links feature is no longer deferred — slice 5 now mounts ShareLinksSection in Settings.tsx. Update specs.md to reflect the current implementation status. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Euoj6Jxu2a2gBVqSM6VjcB Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…ckdrop (HeroUI v3 latch) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Euoj6Jxu2a2gBVqSM6VjcB Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
d7c7809 to
b9863cb
Compare
Feature 014 slice 5: share links — settings section (create / created / revoke dialogs, link table) and the public
/share/$tokenpage with its five states, all on HeroUI v3. Stacked on the slice 2a branch014c-servers-core(PR #351); retarget once that merges.Design first — design commit 3c40edb. Node ids: xCJlu dQV9N atqRh VM7ro S7SCDc C2LQE4 q31B6w qFLfB EcoGD epZO2.
Code — T172–T178, T181–T195. T179 (mounting ShareLinks in Settings.tsx) is deferred to the slice-2b branch, which rewrites that file. FR-005: the public page renders no cluster name, namespace, version, user names, counts or enumeration hints; 404 and 429 map to the same neutral state. FR-012: UI imports only from
@heroui/reactand@/components/hero/.Verification — sonnet review, fix wave, opus re-review, final pass; all against the installed
@heroui/reactdeclarations (no local test/lint runs, rule 8); CI is the authority.🤖 Generated with Claude Code
https://claude.ai/code/session_012eNzkxWht6owTjFzMKWr98