# Hide Auto-Increment IDs in Create Forms Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** Hide generated auto-increment fields in create dialogs while showing them read-only in edit and view dialogs. **Architecture:** Keep field metadata unchanged and implement visibility in the Qing Vue template with a runtime `v-if` keyed to the generated primary-key value. Add a template-rendering regression test so both frontend and admin-frontend generation inherit the behavior. **Tech Stack:** Java 8, JUnit 4, Apache Velocity, Vue 2, Element UI, Maven --- ### Task 1: Template rendering behavior **Files:** - Modify: `ruoyi-generator/src/test/java/com/ruoyi/generator/util/QingTemplateSupportTest.java` - Modify: `ruoyi-generator/src/main/resources/qing/index.vue.vm` - [ ] **Step 1: Write the failing rendering test** Add a test that renders `qing/index.vue.vm` for a table with: ```java GenTableColumn id = column("id", "ID", "Long", "id", "1", "1", "1", "1", "EQ", "input"); GenTableColumn name = column("name", "Name", "String", "name", "0", "1", "1", "1", "LIKE", "input"); ``` Assert the rendered template contains: ```java assertTrue(rendered.contains("")); assertTrue(rendered.contains(" ``` For input fields: ```velocity ``` - [ ] **Step 4: Run focused and related tests** Run: ```powershell mvn -pl ruoyi-generator -am "-Dtest=QingTemplateSupportTest" "-Dsurefire.failIfNoSpecifiedTests=false" test ``` Expected: all `QingTemplateSupportTest` tests pass. - [ ] **Step 5: Verify generated output** Render or regenerate project 106 and confirm the generated book form contains: ```vue ``` Open `http://127.0.0.1:20178/#/admin/books` and verify: - clicking “新增” does not show ID; - editing an existing record shows ID read-only; - saving a new record still succeeds. ### Task 2: Final verification **Files:** - Verify: `ruoyi-generator/src/main/resources/qing/index.vue.vm` - Verify: `ruoyi-generator/src/test/java/com/ruoyi/generator/util/QingTemplateSupportTest.java` - [ ] **Step 1: Run regression tests** ```powershell mvn -pl ruoyi-generator -am "-Dtest=QingTemplateSupportTest,FrontProjectServiceImplTest,MysqlDdlBuilderTest" "-Dsurefire.failIfNoSpecifiedTests=false" test ``` Expected: zero failures and zero errors. - [ ] **Step 2: Check the patch** ```powershell git diff --check -- ruoyi-generator/src/main/resources/qing/index.vue.vm ruoyi-generator/src/test/java/com/ruoyi/generator/util/QingTemplateSupportTest.java ``` Expected: exit code 0.