Commit graph

51 commits

Author SHA1 Message Date
dongmucat
a85298f7ae
Merge pull request #508 from iflytek/fix/security-review-hardening
fix(security): harden review findings
2026-06-17 11:08:38 +08:00
dongmucat
a865960cf3 fix(notification): ISSUE-51 add profile review notifications
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 10:33:02 +08:00
dongmucat
40d7de8462 fix(security): harden review findings
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-12 14:40:30 +08:00
dongmucat
d58c934d64
Merge pull request #482 from iflytek/feature/namespace-search-download
feat(skill): add namespace search and bundle download
2026-06-10 20:10:32 +08:00
dongmucat
201e636858 test(web): add namespace search-only regression
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-10 19:48:16 +08:00
dongmucat
6779c1eecd
feat(web): preview relative markdown package links (#502)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-10 16:31:22 +08:00
dongmucat
43d66a59e1 Merge remote-tracking branch 'origin/main' into HEAD
Signed-off-by: dongmucat <1127093059@qq.com>

# Conflicts:
#	server/skillhub-domain/src/test/java/com/iflytek/skillhub/domain/skill/service/SkillDownloadServiceTest.java
2026-06-09 14:29:03 +08:00
dongmucat
b5edfb850e fix(web): clarify namespace bundle download limits
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-09 10:02:26 +08:00
dongmucat
6dc62ddfb8
feat(web): add install method tabs (#496)
* feat(web): add install method tabs

Signed-off-by: dongmucat <1127093059@qq.com>

* test(web): stabilize real service e2e checks

Signed-off-by: dongmucat <1127093059@qq.com>

* style(web): simplify install tab indicator

Signed-off-by: dongmucat <1127093059@qq.com>

---------

Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-05 17:27:34 +08:00
XiaoSeS
531d59caf2
feat(my-skills): add keyword search, namespace filter and clickable pagination (#493)
* feat(my-skills): add keyword search, namespace filter and clickable pagination

Add comprehensive filtering and search capabilities to the My Skills page:

- Keyword search: search by skill name, slug, or description
- Namespace filter: filter skills by namespace
- Clickable pagination: page number buttons with smart ellipsis
- State preservation: sync search state to URL, restore when returning from detail page
- Debounced search: 300ms debounce to avoid excessive queries
- Fix: hide stale rejected preview badge when newer version is published

Backend changes:
- MySkillAppService: add keyword and namespace filtering logic
- SkillLifecycleProjectionService: only show preview versions newer than published
- MeController: add keyword and namespace query parameters
- 6 new test cases covering search and filter scenarios

Frontend changes:
- my-skills.tsx: search input, namespace dropdown, URL state sync
- pagination.tsx: clickable page numbers with ellipsis
- use-user-queries.ts: prevent flicker on query transitions
- skill-detail.tsx: remove invalid rejected badge display
- router.tsx: URL parameter validation
- i18n: add search-related translation keys

Synced from SAAS commits:
- 939fa749 (feat: search and filters)
- dc14df6c (fix: search flicker)
- 0168ea81 (fix: rejected badge)
- c9eefa93 (fix: stale preview)

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* fix(tests): address test failures in PR #493

Backend test fixes:
- Remove unnecessary Mockito stubbing for filtered-out skills
- Add missing findBySkillIdAndStatus stub for published version lookup
- Update MeController test mocks to match new method signature (keyword, namespace params)

Frontend fixes:
- Fix TypeScript error: useMyNamespaces returns ManagedNamespace[] not PagedResponse
- Add type annotation for namespace map callback parameter

E2E test fix:
- Update URL regex to allow query parameters (returnTo from search page)

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* fix(tests): resolve test failures in PR #493

Backend:
- Remove unnecessary mock stubbings for skillId 2 and 3 in MySkillAppServiceTest.listMySkills_combinesKeywordNamespaceAndStatusFilters
- The test filters results to only return skill with id=1, so mocks for id 2 and 3 were never called, causing UnnecessaryStubbingException

Frontend:
- Add missing mocks for useLocation, useSearch, useMyNamespaces, and useDebounce in my-skills.test.ts
- MySkillsPage component uses these hooks but the test setup didn't provide mocks, causing 'No QueryClient set' and 'No export' errors

All 4 frontend tests now pass locally.

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-06-05 17:24:51 +08:00
dongmucat
6bb89b1c89 fix(skill): address namespace bundle review findings
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-04 17:12:44 +08:00
dongmucat
204f52dd30 test(web): add namespace search download e2e coverage
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-04 15:49:40 +08:00
dongmucat
d0e2a50b0e fix(admin): improve accessibility and E2E test precision
- Add ariaLabel prop to CopyButton for screen reader differentiation
- Pass per-user aria-label: "Copy user ID for {username}"
- Add truncation for long userIds (max-w-[14rem] + title tooltip)
- Scope E2E copy-button assertions to userId cell to avoid false positives
- Assert on span.font-mono for userId text to exclude button text
- Use toHaveText instead of getByRole name for "Copied" feedback check
2026-05-18 17:25:21 +08:00
dongmucat
d98fe8d802 fix(e2e): address review feedback on admin-users-userid-column tests
- Fix race condition: use Promise.all for goto + waitForResponse
- Remove all waitForTimeout calls, use explicit assertions/waitForResponse
- Assert clipboard content equals the actual userId (not just non-empty)
- Fix unused variable (userIdText) that would fail lint --max-warnings 0
- Trigger real search via button click instead of just filling input
- Add status filter test to cover the filter path
- Add comment explaining mock-profile approach for admin session
2026-05-18 16:37:01 +08:00
dongmucat
a2d08b76c1 feat(admin): add userId column to user management list
Add a userId column with one-click copy functionality to the admin
user management table to help administrators easily access user IDs
for batch operations like namespace member management.

Changes:
- Add userId column after username in admin users table
- Implement one-click copy button for each userId
- Add i18n translations for column header (en/zh)
- Add comprehensive E2E tests (6 test cases)

Closes #426
2026-05-18 15:35:50 +08:00
dongmucat
8931f6d241 feat(web): add CLI install tab on landing quick start
Add a third peer tab 'CLI' to LandingQuickStartSection that surfaces the
official install command 'npm i -g @astron-team/skillhub'. Layout uses
grid-cols-1 md:grid-cols-3 so mobile shows tabs stacked and desktop
shows three equal-width columns.

Addresses iflytek/skillhub#419 (homepage Quick Start part only).
2026-05-12 11:05:02 +08:00
dongmucat
2821262fa4
Merge pull request #408 from iflytek/fix/namespace-delete-341
fix(namespace): support team namespace deletion
2026-05-09 15:04:06 +08:00
dongmucat
8dd1668555 fix(namespace): support team namespace deletion 2026-05-08 10:15:17 +08:00
dongmucat
5c95ab2b38 feat(skill): add version compare page with unified diff
Introduce a dedicated `/space/$namespace/$slug/compare` page that compares
two published skill versions GitHub-style: left file list + right unified
diff. Backend exposes `GET /versions/compare` returning structured diff
(computed via java-diff-utils) with per-file hunks, binary placeholder,
and truncation flags. Frontend uses two version selectors scoped to
PUBLISHED versions, a file search box, active-file highlighting, and
whitespace-preserving unified view. E2E covers the publish + rerelease
+ approve round trip; controller/domain tests cover happy path and
same-version rejection.
2026-05-07 09:45:26 +08:00
dongmucat
f41723e0dc
Merge pull request #356 from iflytek/feature/skill-subscription-notification
feat(subscription): add skill subscription notification feature
2026-04-29 15:20:40 +08:00
dongmucat
62f3c3a0b4 fix(e2e): approve skill review before testing subscription
Published skills start in PENDING_REVIEW status with canInteract=false,
so the SubscribeButton is not rendered. Use admin user to approve the
review first, following the same pattern as search-seed and review-seed.
2026-04-29 10:31:27 +08:00
dongmucat
f0760a6416 fix(e2e): resolve strict mode violation in subscription tests
Use .first() for h1 heading locator since skill detail page
renders two h1 elements (page title + README heading).
Add page-ready wait in second test before locating Subscribe button.
2026-04-29 10:05:51 +08:00
dongmucat
284b0992af test(subscription): add frontend unit and e2e tests 2026-04-29 09:52:54 +08:00
dongmucat
f707cfee61
Merge pull request #342 from iflytek/feature/batch-member-import
feat(namespace): batch member import via CSV upload
2026-04-28 09:44:53 +08:00
dongmucat
c330db0bf3 feat(ui): display user ID on dashboard and profile settings pages 2026-04-27 14:54:39 +08:00
dongmucat
c1241ff83a test(namespace): fully mock search api in pagination e2e test
Root cause: two issues caused CI failure:
1. publishSkill hit 429 rate limit from other tests in the suite
2. glob pattern '?' was ambiguous for matching literal '?' in URLs

Fix: remove publishSkill dependency, use regex route matching, and
return fully mocked API responses with fake skill data. This tests
the frontend pagination UI behavior without needing real published
skills.
2026-04-27 11:42:43 +08:00
dongmucat
548ded0ad0 test(namespace): fix pagination e2e rate limit by intercepting search api 2026-04-27 11:25:07 +08:00
dongmucat
0020989ccb fix(namespace): add pagination to namespace skill list
The namespace detail page hardcoded a limit of 20 skills with no
pagination controls, so namespaces with more than 20 skills appeared
truncated. Add page state, wire it into the search query, and render
the shared Pagination component when total exceeds PAGE_SIZE. Also
reset page to 0 when the namespace param changes.

Closes #350
2026-04-27 10:54:57 +08:00
dongmucat
0cc3c46831
Merge pull request #340 from iflytek/feature/web-update-skill
feat(dashboard): add Update button to My Skills with publish prefill
2026-04-24 15:25:04 +08:00
dongmucat
df85ea0e18 fix(search): preserve empty-query discovery results 2026-04-23 16:24:23 +08:00
dongmucat
068cdaf84c test(namespace): add batch import members E2E tests
Adds Playwright E2E tests for batch member import dialog:
- Opens dialog and verifies upload step UI elements
- Uploads CSV with mixed valid/invalid rows and verifies preview with validation messages

Uses admin context pattern to create namespace and add test user as ADMIN member.
2026-04-22 16:36:18 +08:00
dongmucat
230b915194 feat(dashboard): add Update button to My Skills with publish prefill
Add an "Update" button to each skill card on the My Skills dashboard
page. Clicking it navigates to the Publish page with the skill's
namespace and visibility pre-selected, reducing manual steps when
re-publishing a skill package.

- Add visibility field to SkillSummaryResponse so the list API exposes
  each skill's current visibility setting
- Add publish-prefill module to normalize and validate URL search params
- Wire TanStack Router validateSearch on the publish route
- Add E2E tests covering the prefill flow and invalid-param fallback
2026-04-22 14:59:01 +08:00
dongmucat
701ef12d33 test(e2e): wait for search cards before counting 2026-04-21 17:55:53 +08:00
dongmucat
89bc58d29e
Merge pull request #311 from iflytek/fix/public-skill-detail-anon
fix(web): allow anonymous access to public skill detail
2026-04-15 16:58:45 +08:00
XiaoSeS
4619e546bf
fix(search): show default discovery list on empty query (#312) 2026-04-15 16:58:21 +08:00
dongmucat
3c4c33ad95 fix(web): allow anonymous access to public skill detail 2026-04-15 16:16:08 +08:00
dongmucat
1246cca930
Merge pull request #279 from iflytek/fix/issue-276-review-own-namespace
fix(review): allow namespace admins to review own submissions
2026-04-14 17:22:08 +08:00
dongmucat
ccf7e3840d test(e2e): harden namespace selection for publish flows 2026-04-14 16:16:08 +08:00
dongmucat
a6a3bdc5f3 test(e2e): verify publish via response and list 2026-04-14 15:29:47 +08:00
dongmucat
4d67403e59 test(e2e): relax publish navigation check 2026-04-14 14:32:17 +08:00
dongmucat
cc8b56e26c test(e2e): avoid load-event wait in publish flow 2026-04-14 14:17:57 +08:00
dongmucat
7dff8dc697 test(e2e): stabilize publish and search waits 2026-04-14 13:55:33 +08:00
dongmucat
5dd89097e5 test(review): stabilize namespace review e2e setup 2026-04-14 09:29:18 +08:00
dongmucat
38ebb13133
feat(auth): 邮箱验证码重置密码与 SMTP 配置支持 (#273)
* feat(auth): add email-based password reset with SMTP config docs

* test(e2e): stabilize password reset flow

* test(e2e): isolate password reset rate limits

* test(ci): stabilize backend and register e2e

* docs(auth): sanitize smtp setup examples
2026-04-13 20:27:00 +08:00
dongmucat
38757084ba fix(review): restore namespace admin review access 2026-04-13 17:03:41 +08:00
tenten-shih
77e271f24c
Merge pull request #269 from iflytek/pr/exclude-playwright-report
fix register validation, review visibility, and search e2e coverage
2026-04-09 14:37:46 +05:30
tenten-shih
25c0a21404 test(e2e): stabilize duplicate registration and search cards 2026-04-09 13:19:06 +05:30
huishi3
69a299e40f test(e2e): add auth validation and search coverage 2026-04-09 09:56:58 +05:30
dongmucat
c2981836bb
fix(reviews): add dashboard review pagination and tests (#241) 2026-04-07 14:10:48 +08:00
dongmucat
50a6c4b7fe test(e2e,ci): migrate web e2e to real API and add PR e2e workflow (#198)
* chore(workflow): align local hooks and e2e guidance

* test(e2e): expand reusable api mock helpers

* test(skill): stabilize share button e2e assertions

* chore(test): add e2e make target and tune playwright workers

* test(web): expand e2e coverage and smoke suite

* test(e2e): migrate to real API flows and add request-based data builder

* ci(e2e): add PR workflow for real-service frontend e2e

* ci(e2e): install playwright chromium in PR workflow

* test(e2e): relax timeout and force single worker in CI

* test(e2e): stabilize not-found assertions and harden CI session bootstrap

* chore(agents): align tester role with web/e2e workflow
2026-04-01 14:41:23 +08:00