mirror of
https://github.com/imgfloat/server.git
synced 2026-03-22 23:10:38 +00:00
Add todos
This commit is contained in:
@@ -12,6 +12,8 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class SchemaMigration implements ApplicationRunner {
|
||||
|
||||
// TODO: Code smell Runtime schema migration logic duplicates Flyway responsibilities and is difficult to reason about/test.
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SchemaMigration.class);
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
@@ -56,6 +56,8 @@ import org.springframework.web.server.ResponseStatusException;
|
||||
@SecurityRequirement(name = "twitchOAuth")
|
||||
public class ChannelApiController {
|
||||
|
||||
// TODO: Code smell Controller surface area is very large, suggesting too many endpoint responsibilities in one type.
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ChannelApiController.class);
|
||||
private final ChannelDirectoryService channelDirectoryService;
|
||||
private final OAuth2AuthorizedClientService authorizedClientService;
|
||||
|
||||
@@ -60,6 +60,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
|
||||
@Service
|
||||
// TODO: Code smell God class; this service mixes admin management, asset CRUD, media processing, websocket publishing, and marketplace concerns.
|
||||
public class ChannelDirectoryService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChannelDirectoryService.class);
|
||||
@@ -74,6 +75,7 @@ public class ChannelDirectoryService {
|
||||
AssetType.OTHER
|
||||
);
|
||||
|
||||
// TODO: Code smell Constructor has too many dependencies, indicating high coupling and too many responsibilities.
|
||||
private final ChannelRepository channelRepository;
|
||||
private final AssetRepository assetRepository;
|
||||
private final VisualAssetRepository visualAssetRepository;
|
||||
|
||||
@@ -22,6 +22,8 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class MarketplaceScriptSeedLoader {
|
||||
|
||||
// TODO: Code smell Large parser/loader with many branching paths; consider decomposing into smaller collaborators.
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MarketplaceScriptSeedLoader.class);
|
||||
private static final String METADATA_FILENAME = "metadata.json";
|
||||
private static final String SOURCE_FILENAME = "source.js";
|
||||
|
||||
@@ -30,6 +30,8 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
@Service
|
||||
public class SevenTvEmoteService {
|
||||
|
||||
// TODO: Code smell Service handles transport, parsing, and storage concerns together instead of focused components.
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SevenTvEmoteService.class);
|
||||
private static final String USERS_URL = "https://api.twitch.tv/helix/users";
|
||||
private static final String USER_EMOTE_URL = "https://7tv.io/v3/users/twitch/";
|
||||
|
||||
@@ -34,6 +34,8 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
@Service
|
||||
public class TwitchEmoteService {
|
||||
|
||||
// TODO: Code smell Service bundles API client calls, caching, disk persistence, and async scheduling in one class.
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TwitchEmoteService.class);
|
||||
private static final String GLOBAL_EMOTE_URL = "https://api.twitch.tv/helix/chat/emotes/global";
|
||||
private static final String CHANNEL_EMOTE_URL = "https://api.twitch.tv/helix/chat/emotes";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TODO: Code smell Monolithic admin console logic centralizes rendering, transport, and interaction handling in one file.
|
||||
import { isAudioAsset } from "../media/audio.js";
|
||||
import { isApngAsset, isCodeAsset, isGifAsset, isModelAsset, isVideoAsset, isVideoElement } from "../broadcast/assetKinds.js";
|
||||
import { createModelManager } from "../media/modelManager.js";
|
||||
|
||||
@@ -8,6 +8,7 @@ import { createMediaManager } from "./mediaManager.js";
|
||||
import { createModelManager } from "../media/modelManager.js";
|
||||
|
||||
export class BroadcastRenderer {
|
||||
// TODO: Code smell Renderer class accumulates networking, state management, media orchestration, and rendering responsibilities.
|
||||
constructor({ canvas, scriptLayer, broadcaster, showToast }) {
|
||||
this.canvas = canvas;
|
||||
this.ctx = canvas.getContext("2d");
|
||||
|
||||
@@ -330,6 +330,7 @@ function createScriptHandlers(source, context, state, sourceLabel = "") {
|
||||
return factory(context, state, module, exports);
|
||||
}
|
||||
|
||||
// TODO: Code smell Worker command handling relies on a long conditional dispatcher that is hard to maintain.
|
||||
self.addEventListener("message", (event) => {
|
||||
const { type, payload } = event.data || {};
|
||||
if (type === "init") {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TODO: Code smell Large modal module with extensive mutable state and mixed UI/network responsibilities.
|
||||
export function createCustomAssetModal({
|
||||
broadcaster,
|
||||
adminChannels = [],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TODO: Code smell Dashboard script uses broad shared state and imperative DOM updates instead of focused components.
|
||||
const elements = {
|
||||
adminList: document.getElementById("admin-list"),
|
||||
suggestionList: document.getElementById("admin-suggestions"),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TODO: Code smell Script performs global DOM lookups/state mutation at module load, increasing coupling and test difficulty.
|
||||
const formElement = document.getElementById("settings-form");
|
||||
const submitButtonElement = document.getElementById("settings-submit-button");
|
||||
const canvasFpsElement = document.getElementById("canvas-fps");
|
||||
|
||||
Reference in New Issue
Block a user