fix: address code review findings (critical + high + medium)

Critical:
- retryOnBusy: return lastErr after exhausted retries instead of nil

High:
- Remove debug console.log from use-paired-devices.ts

Medium:
- ChannelGeneralTab: sync state from instance prop via useEffect
- i18n: add MsgCannotRemoveLastWriter key + translations (en/vi/zh)
- use-channel-crud: refetch after delete instead of optimistic remove
This commit is contained in:
viettranx committed 2026-03-27 20:53:05 +07:00
1 parent 5f5b0c45bd
commit 8b08dec04c
9 files changed
+27 -15

No files matched your search

+1 -1
View File
@@ -437,7 +437,7 @@ func (h *ChannelInstancesHandler) handleRemoveWriter(w http.ResponseWriter, r *h
}
}
if allowCount <= 1 {
writeError(w, http.StatusConflict, protocol.ErrFailedPrecondition, "cannot remove the last file writer")
writeError(w, http.StatusConflict, protocol.ErrFailedPrecondition, i18n.T(locale, i18n.MsgCannotRemoveLastWriter))
return
}
if err := h.configPermStore.Revoke(r.Context(), agentID, groupID, "file_writer", userID); err != nil {