refactor(referral): prune dead code and formalize ops list header

- remove unused AuthReader::invitation_mode and ReferralAttribution
  helpers (get_or_create_code / validate_ref); contract test now
  asserts the canonical invit_code_s reader in CreditsRuntime
- drop legacy aksrt_invite table from uninstall cleanup list
- track referral code creation time (aksrt_referral_code_created)
  and surface it in the referral ops REST list
- formalize ops list headers (归属用户/推广码/启用状态/推广用户数/
  有效付费用户数/创建时间) and right-align count columns
This commit is contained in:
2026-09-19 12:54:22 +08:00
parent b375fcc55c
commit ae626ba1c8
5 changed files with 23 additions and 32 deletions
@@ -162,7 +162,6 @@ test('shared renderer contracts every configured authentication state', () => {
const shared = read('templates/parts/auth-content.php');
const modal = read('templates/parts/modal-auth.php');
const client = read('assets/js/auth.js');
const settings = read('src/Settings/AuthReader.php');
assert.match(shared, /data-auth-password-fields/);
assert.match(shared, /data-auth-code-fields/);
@@ -193,8 +192,8 @@ test('shared renderer contracts every configured authentication state', () => {
assert.match(client, /form\.checkValidity\(\)[\s\S]*?field\.validationMessage/);
assert.match(client, /window\.location\.assign\(authPageUrl/);
assert.doesNotMatch(client + shared, /showMessage|data-auth-message|sign-message/);
assert.match(settings, /invitation_mode/);
assert.match(settings, /\['close', 'open', 'must'\]/);
assert.match(read('src/Settings/CreditsRuntime.php'), /invit_code_s/);
assert.match(read('src/Settings/CreditsRuntime.php'), /\['close', 'open', 'must'\]/);
});
test('OAuth frontend is accessible, redirect-aware, and removes retired providers', () => {