chore: remove comments and improve readability across web and backend#243
Merged
Conversation
Strip explanatory comments from the frontend and backend per the project's self-documenting code convention, while preserving functional directives (flake8 noqa, eslint-disable in generated files) and leaving generated artifacts untouched. Readability and lint-safety: - Replace comment-only empty catch blocks with explicit no-ops so they stay lint-clean without narration. - Rewrite the post-mutation entity reload as a promise chain instead of a try/catch/finally that relied on a comment. Tests: - Backend: add unit coverage for the datetime normalizer, the location kind validators, and the task-graph preset/validation helpers. - Frontend: add unit coverage for saved-view definition helpers, the property filter-type mapping, and the anonymized survey URL builder. - E2E: add a resilient smoke spec for the document shell, mobile viewport, and core entity routes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Code cleanup across the frontend (
web/) and backend (backend/), following the project's self-documenting-code convention (AGENTS.md §10: "write self-explanatory code", no comments).Comment removal
.ts,.tsx,.css) and backend (.py) source.# noqa: F401re-export suppressions, andeslint-disabledirectives inside generated files.web/api/gql/generated.ts,web/i18n/translations.ts,next-env.d.ts, DB migrations).Readability / lint-safety
catchblocks with explicit no-ops so they remain lint-clean (theno-emptyrule requires a non-empty body).reloadEntityAfterMutation) from atry/catch/finallythat depended on a comment into an equivalent promise chain. Behavior is unchanged and covered by the existing handler tests.Tests added (coverage)
normalize_datetime_to_utc(naive / UTC-aware / offset /None).LocationValidatorkind checks (validate_kind,validate_position_kind,validate_team_kind).validate_task_graph_dictedge cases +graph_dict_from_preset_inputs.viewDefinitionhelpers (filter/sort serialization round-trips, visibility/order baseline comparisons,parseViewParameters).getPropertyFilterFnfield-type → data-type mapping.buildSurveyUrlanonymized (hashed) user-id query param.Validation
All run locally against Postgres + Redis matching the CI services:
flake8clean;pytest tests/unit tests/integration→ 72 passed (was 48).tsc --noEmit && eslint .clean;vitest run→ 55 passed (was 23);check-translationsclean.No behavior changes intended; no generated files edited by hand.
Generated by Claude Code