Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: アカウント削除時のクライアントの挙動をいい感じにするなど #10002

Merged
merged 16 commits into from
Mar 9, 2023

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented Feb 19, 2023

Resolve #9322

What

  • api/iで、もしuserProfileを検索した結果がnullであればアカウントが削除されているということなので、その旨を明示するエラーを返す
  • クライアントのaccount.ts
    • fetchAccount (クライアント起動時やユーザー切り替え時に呼ばれる)で、トークン失効時やアカウント削除時にエラーを表示してログアウトするように
    • openAccountMenu (ナビゲーションの最下部などを押すと呼ばれるアカウントメニュー)で、もしusers/showでuserIdが見つからなかった場合にはuserIdを表示し、クリックするとログインするように(もしトークン失効などがあれば↑が働く)
  • settings/accounts.vueのデザイン変更など
  • 型エラー潰し

Why

アカウント周りの挙動が怪しいのをなおしたかった

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Feb 19, 2023
@codecov
Copy link

codecov bot commented Feb 19, 2023

Codecov Report

Merging #10002 (fe004ed) into develop (a4ca127) will decrease coverage by 0.06%.
The diff coverage is 15.96%.

@@             Coverage Diff             @@
##           develop   #10002      +/-   ##
===========================================
- Coverage    70.80%   70.74%   -0.06%     
===========================================
  Files          807      807              
  Lines        77207    77286      +79     
  Branches      5378     5380       +2     
===========================================
+ Hits         54666    54678      +12     
- Misses       22541    22608      +67     
Impacted Files Coverage Δ
packages/frontend/src/account.ts 11.40% <3.00%> (-3.07%) ⬇️
packages/backend/src/server/api/ApiCallService.ts 62.42% <66.66%> (ø)
packages/backend/src/server/api/endpoints/i.ts 97.46% <86.66%> (-2.54%) ⬇️
packages/backend/src/server/api/error.ts 78.57% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tamaina
Copy link
Contributor Author

tamaina commented Mar 1, 2023

refreshAccountを作り直してログイン時に要求するようにした

@rinsuki
Copy link
Contributor

rinsuki commented Mar 5, 2023

死ぬほどアカウント登録してる狂人と重いサーバーの組み合わせでかなり厄介なことになりそうな予感がするので全アカウントrefreshはもうちょっと本当にやるか考えたほうがいいかも (単純計算で10アカウントにログインしていて一回の確認に1秒かかる場合アカウント管理画面を開くのに10秒かかる)

@tamaina
Copy link
Contributor Author

tamaina commented Mar 5, 2023

refreshはもうちょっと本当にやるか考えたほうが

なんか要らない気がしてきた(フォールバック表示は実装する必要ある

@tamaina tamaina changed the title enhance(frontend): アプリを開いた時、ログインしているすべてのアカウントの状況を調べるように fix: アカウント削除時の挙動が怪しいのを修正する Mar 5, 2023
@tamaina tamaina changed the title fix: アカウント削除時の挙動が怪しいのを修正する fix: アカウント削除時のクライアントの挙動が怪しいのを修正する Mar 5, 2023
@tamaina
Copy link
Contributor Author

tamaina commented Mar 5, 2023

フォールバック表示とか要らないし"なかったこと"にすればいいか

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Mar 5, 2023
@tamaina tamaina changed the title fix: アカウント削除時のクライアントの挙動が怪しいのを修正する fix: アカウント削除時のクライアントの挙動をいい感じにする Mar 5, 2023
@tamaina tamaina changed the title fix: アカウント削除時のクライアントの挙動をいい感じにする fix: アカウント削除時のクライアントの挙動をいい感じにするなど Mar 5, 2023
@tamaina tamaina changed the title fix: アカウント削除時のクライアントの挙動をいい感じにするなど enhance: アカウント削除時のクライアントの挙動をいい感じにするなど Mar 5, 2023
@tamaina
Copy link
Contributor Author

tamaina commented Mar 5, 2023

なんかめっちゃ変えた

@syuilo
Copy link
Member

syuilo commented Mar 8, 2023

lintが落ちとる

@tamaina
Copy link
Contributor Author

tamaina commented Mar 9, 2023

はい

@syuilo syuilo merged commit c75afad into misskey-dev:develop Mar 9, 2023
@syuilo
Copy link
Member

syuilo commented Mar 9, 2023

👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

トークン再生成などによりAuthentication Failedになった場合、ログアウトするように
4 participants